Commit 31b29c62 by Lee Millward Committed by Lee Millward

re PR c++/28269 (ICE on attribute for invalid template)

	PR c++/28269
	* parser.c (cp_parser_elaborated_type_specifier):
	Return early if an invalid type was detected.

	* g++.dg/template/crash54.C: New test.

From-SVN: r115475
parent 662c2e83
......@@ -7,6 +7,10 @@
type not being an acceptable Java parameter if
it's error_mark_node.
PR c++/28269
* parser.c (cp_parser_elaborated_type_specifier):
Return early if an invalid type was detected.
2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28249
......
......@@ -10247,6 +10247,9 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
}
}
if (type == error_mark_node)
return error_mark_node;
/* Allow attributes on forward declarations of classes. */
if (attributes)
{
......
......@@ -2,6 +2,9 @@
PR c++/28292
* g++.dg/other/error12.C: New test.
PR c++/28269
* g++.dg/template/crash54.C: New test.
2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
//PR c++/28269
template<int> struct A;
struct __attribute__((unused)) A<0<; // { dg-error "template argument|unqualified-id" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment