summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/access17.C
blob: ec8949d77df71f16659e74b523911e27d62023fd (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
// { dg-do assemble  }
// Make sure definitions of static members have the right access.

struct A {
protected:
  int i;                        // { dg-error "" } private
  int f ();			// { dg-error "" } 
};

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

int A::* B::p = &A::i;         // { dg-error "" } 
int (A::* B::fp)() = &A::f;    // { dg-error "" }

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

int A::* C::p = &A::i;		// { dg-error "" } 
int (A::* C::fp)() = &A::f;	// { dg-error "" }