blob: 9bcc81488b59a4b7573e90d23468f9d3645afb08 [file] [log] [blame]
// { dg-do run }
// 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 (B) { f (); }
};
int main ()
{
B b;
g (b);
}