aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>2003-12-07 15:23:31 +0000
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>2003-12-07 15:23:31 +0000
commit9f6a794d626563787e7ed032ae56c005c2a50d6c (patch)
treecceed65ec08f95207104d09da9520944043f5c66 /gcc/cp/except.c
parent1f866b457dcc4257bb7c79b0eae9403faf9a33ff (diff)
downloadgcc-9f6a794d626563787e7ed032ae56c005c2a50d6c.zip
gcc-9f6a794d626563787e7ed032ae56c005c2a50d6c.tar.gz
gcc-9f6a794d626563787e7ed032ae56c005c2a50d6c.tar.bz2
re PR c++/2294 (using declaration confusion)
PR c++/2294 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD unless the declaration is a built-in. (set_namespace_binding): While binding OVERLOADs with only one declaration, we still need to call supplement_binding. * init.c (build_new_1): Deal with an OVERLOAD set when looking up for _Jv_AllocObject. * except.c (build_throw): Likewise for _Jv_Throw. From-SVN: r74394
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 1dc149a..b684efb 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -645,7 +645,12 @@ build_throw (tree exp)
tmp = build_function_type (ptr_type_node, tmp);
fn = push_throw_library_fn (fn, tmp);
}
-
+ else if (really_overloaded_fn (fn))
+ {
+ error ("`%D' should never be overloaded", fn);
+ return error_mark_node;
+ }
+ fn = OVL_CURRENT (fn);
exp = build_function_call (fn, tree_cons (NULL_TREE, exp, NULL_TREE));
}
else if (exp)