aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
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)