OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.robertl/] [eb26.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { 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
//
7
 
8
class foo
9
{
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
   };
19
};
20
 
21
int foo::bar::x;
22
 
23
int foo::f() {
24
  return bar::x;
25
}
26
 
27
int
28
main ()
29
{
30
  return foo::bar::f ();
31
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.