FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900214_01.C
blob09fd184f0ab631600f544786bbc0f4a480102978
1 // g++ 1.36.1 bug 900214_01
3 // g++ allows function members of incomplete types to be declared to be
4 // friends of other types.
6 // Cfront 2.0 passes this test.
8 // keywords: friends, incomplete types, function members
10 struct A;                       // ERROR - forward declaration
12 struct B {
13   friend void A::foo();         // ERROR - type A is incomplete
16 void A::foo();                  /* ERROR - also illegal */
18 struct A {
19   void foo() {}
22 int main () { return 0; }