Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/lookup/scoped1.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // Test that explicitly scoped references to static members work even if |
2 // they belong to an inaccessible base. | |
3 | |
4 struct A | |
5 { | |
6 static int i1; | |
7 int i2; // { dg-message "declared" } | |
8 static void f1 (); | |
9 void f2 (); | |
10 }; | |
11 | |
12 struct B: private A { }; | |
13 struct C: public B | |
14 { | |
15 void g () | |
16 { | |
17 ::A::i1 = 1; | |
18 ::A::i2 = 1; // { dg-error "(access)|(context)" } | |
19 ::A::f1 (); | |
20 ::A::f2 (); // { dg-error "" } | |
21 } | |
22 }; |