repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* ru.po: Update.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
friend.C
blob
9bcc81488b59a4b7573e90d23468f9d3645afb08
1
// { dg-do run }
2
// Bug: g++ doesn't keep track of the lexical context of friends properly.
3
4
extern "C" void exit(int);
5
6
struct B;
7
struct A {
8
static void f () { exit (1); }
9
};
10
11
struct B {
12
static void f () { exit (0); }
13
friend void g (B) { f (); }
14
};
15
16
int main ()
17
{
18
B b;
19
g (b);
20
}