aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/friend.C
blob: ee6ee8d5eaeb5275ec7136d9de121fe90b763b6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Bug: g++ doesn't keep track of the lexical context of friends properly.

extern "C" void exit(int);

struct B;
struct A {
  static void f () { exit (1); }
};

struct B {
  static void f () { exit (0); }
  friend void g () { f (); }
};

main ()
{
  g ();
}