aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/access5.C
blob: 0d58ea0b3f32f8693c8739424d6f824693376e76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Build don't link:

class A
{
protected:
  int i;     
};

class B : private A
{
protected:
  A::i;
};

struct C : public B {
  friend int f(C *p);
};

int f(C *p) {
  return p->i;
}