2 // Contributed by Volker Reichelt <reichelt at gcc dot gnu dot org>
3 // PR c++/14008: Improve diagnostic on invalid types in declarators.
7 template<int> struct A {};
12 N::A f2; // { dg-error "without an argument list" }
13 N::INVALID f3; // { dg-error "in namespace 'N' does not name a type" }
14 N::C::INVALID f4; // { dg-error "in class 'N::C' does not name a type" }
15 N::K f6; // { dg-error "in namespace 'N' does not name a type" }
16 typename N::A f7; // { dg-error "without an argument list|outside of template" }
20 N::A f2; // { dg-error "without an argument list" }
21 N::INVALID f3; // { dg-error "in namespace 'N' does not name a type" }
22 N::C::INVALID f4; // { dg-error "in class 'N::C' does not name a type" }
23 N::K f6; // { dg-error "in namespace 'N' does not name a type" }
24 typename N::A f7; // { dg-error "without an argument list|outside of template" }
30 N::A f2; // { dg-error "without an argument list" }
31 N::INVALID f3; // { dg-error "in namespace 'N' does not name a type" }
32 N::C::INVALID f4; // { dg-error "in class 'N::C' does not name a type" }
33 N::K f6; // { dg-error "in namespace 'N' does not name a type" }
34 typename N::A f7; // { dg-error "without an argument list" }
37 // { dg-bogus "" "bogus excess errors in declaration" { xfail *-*-* } 16 }