aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/access17.C
blob: 9ed7d30d2a5dc09668501c0303c4e40f34894468 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Make sure definitions of static members have the right access.
// Build don't link:

struct A {
protected:
  int i;
  int f ();			// ERROR - 
};

struct B: public A {
  static int A::*p;
  static int (A::*fp)();
};

int A::* B::p = &A::i;
int (A::* B::fp)() = &A::f;

struct C {
  static int A::*p;
  static int (A::*fp)();
};

int A::* C::p = &A::i;		// ERROR - 
int (A::* C::fp)() = &A::f;	// ERROR -