/cp
2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (start_decl): Improve permerror location.
/testsuite
2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/diagnostic/out-of-class-redeclaration.C: New.
From-SVN: r267675
+2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl.c (start_decl): Improve permerror location.
+
2019-01-08 Jonathan Wakely <jwakely@redhat.com>
Jakub Jelinek <jakub@redhat.com>
if (DECL_EXTERNAL (decl) && ! DECL_TEMPLATE_SPECIALIZATION (decl)
/* Aliases are definitions. */
&& !alias)
- permerror (input_location, "declaration of %q#D outside of class is not definition",
+ permerror (declarator->id_loc,
+ "declaration of %q#D outside of class is not definition",
decl);
}
+2019-01-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/diagnostic/out-of-class-redeclaration.C: New.
+
2019-01-08 Iain Sandoe <iain@sandoe.co.uk>
* c-c++-common/builtin-has-attribute-3.c: Skip tests requiring symbol
--- /dev/null
+// Adapted from g++.old-deja/g++.law/arm8.C
+
+struct K {
+ void f(int);
+};
+
+void K::f(int); // { dg-error "6:declaration of .void K::f\\(int\\). outside of class" }
+
+struct L {
+ void g(int) {}
+};
+
+void L::g(int); // { dg-error "6:declaration of .void L::g\\(int\\). outside of class" }