+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
... [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. */
+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.
+
2019-10-21 Jakub Jelinek <jakub@redhat.com>
PR c++/92015
namespace Glib {
template <typename> class Value {};
- template <> class Glib::Value<int> {}; // { dg-error "" }
+ template <> class Glib::Value<int> {}; // { dg-error "29:extra qualification" }
}
struct A {
- int A::fn(); // { dg-error "extra qualification" }
- int A::m; // { dg-error "extra qualification" }
+ int A::fn(); // { dg-error "7:extra qualification" }
+ int A::m; // { dg-error "7:extra qualification" }
struct e;
- struct A::e {int i;}; // { dg-error "extra qualification" "qual" }
- // { dg-error "anonymous struct" "anon" { target *-*-* } .-1 }
+ struct A::e {int i;}; // { dg-error "10:extra qualification" "qual" }
struct A::expand { // { dg-error "qualified name" }
int m;
};