]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
parser.c (cp_parser_alias_declaration): Don't do semantic processing if parsing failed.
authorJason Merrill <jason@redhat.com>
Wed, 9 Nov 2011 17:52:57 +0000 (12:52 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 9 Nov 2011 17:52:57 +0000 (12:52 -0500)
* parser.c (cp_parser_alias_declaration): Don't do semantic
processing if parsing failed.

From-SVN: r181218

gcc/cp/ChangeLog
gcc/cp/parser.c

index 7ebe23fb8ebeaf5eee1b28424a9c7fb9049a4df8..c97553092de116419e74cff111108f489e83f34a 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-09  Jason Merrill  <jason@redhat.com>
+
+       * parser.c (cp_parser_alias_declaration): Don't do semantic
+       processing if parsing failed.
+
 2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/51045
index 931c593a447d4b246e8eacedfa62143be7f27a40..3cb6dbf61a056869dba5476ee6203eba3258b0c4 100644 (file)
@@ -14946,6 +14946,9 @@ cp_parser_alias_declaration (cp_parser* parser)
   type = cp_parser_type_id (parser);
   cp_parser_require (parser, CPP_SEMICOLON, RT_SEMICOLON);
 
+  if (cp_parser_error_occurred (parser))
+    return error_mark_node;
+
   /* A typedef-name can also be introduced by an alias-declaration. The
      identifier following the using keyword becomes a typedef-name. It has
      the same semantics as if it were introduced by the typedef