Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.old-deja/g++.jason/access17.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // { dg-do assemble } | |
2 // Make sure definitions of static members have the right access. | |
3 | |
4 struct A { | |
5 protected: | |
6 int i; // { dg-message "" } private | |
7 int f (); // { dg-message "" } | |
8 }; | |
9 | |
10 struct B: public A { | |
11 static int A::*p; | |
12 static int (A::*fp)(); | |
13 }; | |
14 | |
15 int A::* B::p = &A::i; // { dg-error "" } | |
16 int (A::* B::fp)() = &A::f; // { dg-error "" } | |
17 | |
18 struct C { | |
19 static int A::*p; | |
20 static int (A::*fp)(); | |
21 }; | |
22 | |
23 int A::* C::p = &A::i; // { dg-error "" } | |
24 int (A::* C::fp)() = &A::f; // { dg-error "" } |