diff options
author | kan <kan@FreeBSD.org> | 2005-06-03 03:50:42 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2005-06-03 03:50:42 +0000 |
commit | f8dd8336e3484d2d7f4887c5583585521dd055d0 (patch) | |
tree | 56d842dca34faa3e40f969e13617dfdbb051d690 /contrib/gcc/cp/except.c | |
parent | a101babe926f42d1c4b46f430425c21fdcda6f97 (diff) | |
download | FreeBSD-src-f8dd8336e3484d2d7f4887c5583585521dd055d0.zip FreeBSD-src-f8dd8336e3484d2d7f4887c5583585521dd055d0.tar.gz |
Stock files.
Diffstat (limited to 'contrib/gcc/cp/except.c')
-rw-r--r-- | contrib/gcc/cp/except.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/gcc/cp/except.c b/contrib/gcc/cp/except.c index c8112d1..e61e652 100644 --- a/contrib/gcc/cp/except.c +++ b/contrib/gcc/cp/except.c @@ -594,9 +594,9 @@ build_throw (tree exp) fn = push_throw_library_fn (fn, tmp); } else if (really_overloaded_fn (fn)) - {
+ { error ("`%D' should never be overloaded", fn); - return error_mark_node;
+ return error_mark_node; } fn = OVL_CURRENT (fn); exp = build_function_call (fn, tree_cons (NULL_TREE, exp, NULL_TREE)); @@ -610,18 +610,18 @@ build_throw (tree exp) tree temp_expr, allocate_expr; bool elided; + /* The CLEANUP_TYPE is the internal type of a destructor. */ + if (!cleanup_type) + { + tmp = void_list_node; + tmp = tree_cons (NULL_TREE, ptr_type_node, tmp); + tmp = build_function_type (void_type_node, tmp); + cleanup_type = build_pointer_type (tmp); + } + fn = get_identifier ("__cxa_throw"); if (!get_global_value_if_present (fn, &fn)) { - /* The CLEANUP_TYPE is the internal type of a destructor. */ - if (cleanup_type == NULL_TREE) - { - tmp = void_list_node; - tmp = tree_cons (NULL_TREE, ptr_type_node, tmp); - tmp = build_function_type (void_type_node, tmp); - cleanup_type = build_pointer_type (tmp); - } - /* Declare void __cxa_throw (void*, void*, void (*)(void*)). */ /* ??? Second argument is supposed to be "std::type_info*". */ tmp = void_list_node; @@ -631,7 +631,7 @@ build_throw (tree exp) tmp = build_function_type (void_type_node, tmp); fn = push_throw_library_fn (fn, tmp); } - + /* throw expression */ /* First, decay it. */ exp = decay_conversion (exp); |