aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb26.C
blob: 1f9cc126f63f912af1ea6da0df04e52088c25ff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// egcs-2.90.06
// cannot declare friend of enclosing class using its scope, works fine
// without scope or for definition of foo::bar::f
//
// excess errors test - XFAIL *-*-*

class foo
{
public:
  static int f();
  class bar {
    friend int foo::f();
//  friend int f();
    static int x;
  public:
    static int f() {return foo::f();};
   };
};

int foo::f() {
  return bar::x;
}

int
main ()
{
  return foo::bar::f ();
}