Commit 550205c3 by Mark Mitchell Committed by Mark Mitchell

re PR c++/16971 (ICE on duplicate definition)

	PR c++/16971
	* parser.c (cp_parser_init_declarator): Robustify.

	PR c++/16971
	* g++.dg/parse/crash16.C: New test.

From-SVN: r85776
parent c295317d
2004-08-10 Mark Mitchell <mark@codesourcery.com>
PR c++/16971
* parser.c (cp_parser_init_declarator): Robustify.
2004-08-06 Richard Sandiford <rsandifo@redhat.com>
* typeck2.c (process_init_constructor): Guard the missing field warning
......
......@@ -10702,7 +10702,7 @@ cp_parser_init_declarator (cp_parser* parser,
/* Finish processing the declaration. But, skip friend
declarations. */
if (!friend_p && decl)
if (!friend_p && decl && decl != error_mark_node)
{
cp_finish_decl (decl,
initializer,
......
2004-08-10 Mark Mitchell <mark@codesourcery.com>
PR c++/16971
* g++.dg/parse/crash16.C: New test.
2004-08-10 Roger Sayle <roger@eyesopen.com>
* gcc.dg/mips-rsqrt-1.c: New test case.
......
// PR c++/16971
namespace N {
int i; // { dg-error "" }
// By checking for an explicit keyword on the next line we avoid
// matching an ICE message.
int i; // { dg-error "redefinition" }
}
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