aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/friend2.C
blob: 5b1333f7b80051d72daf0c995b2316a1558a490b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Build don't link: 
// GROUPS passed friends
class X {
  int a;
friend void friend_set (X*, int);
};

void friend_set (X *p, int i) { p->a = i; }

void f()
{
  X obj;
  friend_set (&obj, 10);
}