aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-11-06 21:05:44 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-11-06 21:05:44 +0000
commit9965f21f9ce932dd77935cd0375085571e8dffa0 (patch)
tree078f15895c3fe1af4a24d246903573fc9dfad9d7 /gcc/cp/semantics.c
parentf25481f470c2810f6af2a7fcd76e2a0804b5f738 (diff)
downloadgcc-9965f21f9ce932dd77935cd0375085571e8dffa0.zip
gcc-9965f21f9ce932dd77935cd0375085571e8dffa0.tar.gz
gcc-9965f21f9ce932dd77935cd0375085571e8dffa0.tar.bz2
re PR c++/47695 ([C++0X] Calling a deleted function fails twice)
2011-11-06 Paolo Carlini <paolo.carlini@oracle.com> PR c++/47695 * decl2.c (mark_used): Early return false after error or sorry. * cp-tree.h (mark_used): Adjust declaration. * semantics.c (finish_id_expression): Check mark_used return value. From-SVN: r181042
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index cebb7df..c5ced87 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -3286,8 +3286,9 @@ finish_id_expression (tree id_expression,
if (TREE_CODE (first_fn) == TEMPLATE_DECL)
first_fn = DECL_TEMPLATE_RESULT (first_fn);
- if (!really_overloaded_fn (decl))
- mark_used (first_fn);
+ if (!really_overloaded_fn (decl)
+ && !mark_used (first_fn))
+ return error_mark_node;
if (!template_arg_p
&& TREE_CODE (first_fn) == FUNCTION_DECL