Create embedded-5_0-branch branch for development on ARM embedded cores.
[official-gcc.git] / embedded-5_0-branch / gcc / testsuite / g++.old-deja / g++.robertl / eb26.C
blobb43f21a7fa4409318d3e171e163199c67ef3c1a6
1 // { dg-do run  }
2 //
3 // egcs-2.90.06
4 // cannot declare friend of enclosing class using its scope, works fine
5 // without scope or for definition of foo::bar::f
6 //
8 class foo
10 public:
11   static int f();
12   class bar {
13     friend int foo::f();
14 //  friend int f();
15     static int x;
16   public:
17     static int f() {return foo::f();}
18    };
21 int foo::bar::x;
23 int foo::f() {
24   return bar::x;
27 int
28 main ()
30   return foo::bar::f ();