diff options
Diffstat (limited to 'gcc/cp/parser.c')
| -rw-r--r-- | gcc/cp/parser.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 1bb52e5..fd4e1bb 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -14981,11 +14981,17 @@ cp_parser_class_head (cp_parser* parser, cp_parser_commit_to_tentative_parse (parser); /* Issue the error about the overly-qualified name now. */ if (qualified_p) - cp_parser_error (parser, - "global qualification of class name is invalid"); + { + cp_parser_error (parser, + "global qualification of class name is invalid"); + return error_mark_node; + } else if (invalid_nested_name_p) - cp_parser_error (parser, - "qualified name does not name a class"); + { + cp_parser_error (parser, + "qualified name does not name a class"); + return error_mark_node; + } else if (nested_name_specifier) { tree scope; |
