diff options
Diffstat (limited to 'gcc/cp')
| -rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/cp/parser.c | 14 |
2 files changed, 17 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5763e3f..00b3613 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2008-08-12 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/37087 + * parser.c (cp_parser_class_head): Early return error_mark_node in + case of global qualification of class name or qualified name that + does not name a class. + 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/12242 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; |
