* parser.c (cp_parser_enum_specifier): Check for error_mark_node.

From-SVN: r195818
This commit is contained in:
Jason Merrill 2013-02-06 15:58:32 -05:00 committed by Jason Merrill
parent 828e50c53c
commit ceb8649576
3 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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)

View file

@ -0,0 +1,2 @@
namespace A { }
enum A::B { }; // { dg-error "" }