[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / template / crash59.C
blobebc0e281c54c25e4fc58ba364ce122ba42e095df
1 //PR c++/27329
3 template<int> struct A                          // { dg-message "forward declaration" }
4 !                                               // { dg-error "expected unqualified-id" }
5   ;
7 template<int> struct A { int foo(); };          // { dg-error "not a template" }
9 int i = A<0>().foo();                           // { dg-error "not a template|invalid use" }
12 template<int> struct B        
13 !                                               // { dg-error "expected unqualified-id" }
14   ;
16 template<int> struct B { static int bar(); };   // { dg-error "not a template" }
18 int j = B<0>::bar();                            // { dg-error "not a template|incomplete type" }