diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2019-10-21 19:29:41 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2019-10-21 19:29:41 +0000 |
commit | 79cd6c7b905ca9390bc1e7c87c259a5a18cefa81 (patch) | |
tree | 4c70fff8023627a84ce3887ab08492d416c7df86 /gcc/cp | |
parent | 5b884e9400741569ee385f0de4590c1730aa600c (diff) | |
download | gcc-79cd6c7b905ca9390bc1e7c87c259a5a18cefa81.zip gcc-79cd6c7b905ca9390bc1e7c87c259a5a18cefa81.tar.gz gcc-79cd6c7b905ca9390bc1e7c87c259a5a18cefa81.tar.bz2 |
parser.c (cp_parser_class_head): Improve error recovery upon extra qualification error.
/cp
2019-10-21 Paolo Carlini <paolo.carlini@oracle.com>
* parser.c (cp_parser_class_head): Improve error recovery upon
extra qualification error.
/testsuite
2019-10-21 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/parse/qualified2.C: Tighten dg-error directive.
* g++.old-deja/g++.other/decl5.C: Don't expect redundant error.
From-SVN: r277268
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parser.c | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 593510f..19a687a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2019-10-21 Paolo Carlini <paolo.carlini@oracle.com> + + * parser.c (cp_parser_class_head): Improve error recovery upon + extra qualification error. + 2019-10-21 Jakub Jelinek <jakub@redhat.com> PR c++/92015 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 450b144..6433f87 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -24178,12 +24178,8 @@ cp_parser_class_head (cp_parser* parser, ... [or] the definition or explicit instantiation of a class member of a namespace outside of its namespace. */ if (scope == nested_name_specifier) - { - permerror (nested_name_specifier_token_start->location, - "extra qualification not allowed"); - nested_name_specifier = NULL_TREE; - num_templates = 0; - } + permerror (nested_name_specifier_token_start->location, + "extra qualification not allowed"); } /* An explicit-specialization must be preceded by "template <>". If it is not, try to recover gracefully. */ |