3 // Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 22 Apr 1999 <nathan@acm.org>
5 // derived from a bug report by <rch@larissa.sd.bi.ruhr-uni-bochum.de>
6 // http://gcc.gnu.org/ml/gcc-bugs/1999-04n/msg00631.html
7 // the code is wrong, but we fell over badly
11 int A::fn(); // { dg-error "extra qualification" }
12 int A::m; // { dg-error "extra qualification" }
14 struct A::e {int i;}; // { dg-error "extra qualification" "qual" }
15 // { dg-error "anonymous struct" "anon" { target *-*-* } .-1 }
16 struct A::expand { // { dg-error "qualified name" }
20 expand me; // { dg-error "'expand' does not name a type" }
21 void foo(struct A::e);
22 void foo(struct A::z); // { dg-error "incomplete" }
27 struct A::fink { // { dg-error "does not name a class before" }
30 struct A::Z { // { dg-error "does not enclose" } A::Z not a member of B
35 struct ::Q { // { dg-error "global qual" } ::Q not a member of B
38 int A::fn() { // { dg-error "cannot define member" } A::fn not a member of B
41 void fn(struct ::Q &);
42 void foo(struct A::y); // { dg-error "does not name a type" } no such member
45 struct ::C { // { dg-error "invalid before" } extra qualification
56 void NMS::fn(); // { dg-error "should have been" }
57 int NMS::i; // { dg-error "should have been" }
58 struct NMS::D { // { dg-error "does not name a class" }
61 struct N::E { // { dg-error "does not name a class" } no such type
64 struct ::F { // { dg-error "global qual" } no such type
67 int N::fn() { // { dg-error "namespace" } N::fn not a member of NMS
70 struct N::F { // { dg-error "namespace" } N::F not a member of NMS
75 NMS::D thing; // { dg-error "'D' in namespace 'NMS' does not name a type" }
81 // From PR c++/15766 - bad parse error recovery (2 bugs)
82 void confusion1(const UndefinedType& a) // { dg-error "does not name a type" }