aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-10-13 08:38:40 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2005-10-13 08:38:40 +0000
commit8ca4bf259c9e43016064c46ed853191c2ed4abd2 (patch)
tree47e3bf1306fadcd49657cf8f43c314aa5076aa1f /gcc/cp/decl.c
parentf05c19d12690c180c75cea2f10cdfc853da8060c (diff)
downloadgcc-8ca4bf259c9e43016064c46ed853191c2ed4abd2.zip
gcc-8ca4bf259c9e43016064c46ed853191c2ed4abd2.tar.gz
gcc-8ca4bf259c9e43016064c46ed853191c2ed4abd2.tar.bz2
re PR c++/22464 (ICE on classes in template functions which attempt closure)
PR c++/22464 * semantics.c (finish_id_expression): Issue errors about uses of local variables in containing functions even in templates. PR c++/22180 * call.c (build_new_method_call): Correct pretty-printing of destructor names. * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an identifier. PR c++/23694 * decl.c (start_method): Return error_mark_node for errors. PR c++/23307 * pt.c (push_template_decl_real): Complain about attempts to declare template variables. PR c++/22352 * pt.c (tsubst_template_parms): Set processing_template_decl while processing the parameters. (tsubst_decl): Set processing_template_decl when substituting into a TEMPLATE_DECL. PR c++/22405 * pt.c (most_specialized_instantiation): Robustify. PR c++/22464 * g++.dg/template/crash/41.C: New test. PR c++/22180 * g++.dg/template/crash40.C: New test. PR c++/23694 * g++.dg/parse/friend5.C: New test. PR c++/23307 * g++.dg/template/crash38.C: New test. PR c++/22352 * g++.dg/template/friend38.C: New test. PR c++/22405 * g++.dg/template/crash39.C: New test. From-SVN: r105365
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index b76c12d..77f3164 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -10986,7 +10986,7 @@ start_method (cp_decl_specifier_seq *declspecs,
&& TREE_CODE( DECL_CONTEXT (fndecl)) != NAMESPACE_DECL)
error ("%qD is already defined in class %qT", fndecl,
DECL_CONTEXT (fndecl));
- return void_type_node;
+ return error_mark_node;
}
check_template_shadow (fndecl);