Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / parse / friend-main.C
blobe6d32e71ba47c958383761f3b0a4ae1ed532673a
1 // PR c++/24449
3 class Fooa
5   friend int main();
6 };
8 template <class T> class Foob
10   friend int main();
11   int i;
14 int main()
16   Foob<void> a;
17   a.i = 7;
20 class Fooc
22   template<class T> friend int main(); // { dg-error "cannot declare .::main. to be a template" }
25 template<class T> class Food
27   template<class U> friend int main(); // { dg-error "cannot declare .::main. to be a template" }
30 template<class U> int main() {} // { dg-error "cannot declare .::main. to be a template" }