* parser.c (cp_parser_enum_specifier): Check for error_mark_node.
From-SVN: r195818
This commit is contained in:
parent
828e50c53c
commit
ceb8649576
3 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-02-06 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* parser.c (cp_parser_enum_specifier): Check for error_mark_node.
|
||||
|
||||
2013-02-05 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/54122
|
||||
|
|
|
@ -14567,7 +14567,7 @@ cp_parser_enum_specifier (cp_parser* parser)
|
|||
/*check_dependency=*/true,
|
||||
/*ambiguous_decls=*/NULL,
|
||||
input_location);
|
||||
if (name)
|
||||
if (name && name != error_mark_node)
|
||||
{
|
||||
type = TREE_TYPE (name);
|
||||
if (TREE_CODE (type) == TYPENAME_TYPE)
|
||||
|
|
2
gcc/testsuite/g++.dg/parse/enum10.C
Normal file
2
gcc/testsuite/g++.dg/parse/enum10.C
Normal file
|
@ -0,0 +1,2 @@
|
|||
namespace A { }
|
||||
enum A::B { }; // { dg-error "" }
|
Loading…
Add table
Reference in a new issue