[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / lookup / friend14.C
blob5c244112a32944db77f2c8fe2cce176828b1fbf3
1 // PR c++/35109
3 struct C;
4 void f() {
5   struct A {
6     friend struct B;
7     friend struct C;
8     void g()
9     {
10       B *b;                     // { dg-error "not declared" }
11       C* c;                     // OK, finds ::C
12     } 
13   };
14   C *c; // OK, finds ::C
15   struct B {};
16   B *b; // OK, now it isn't hidden