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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // Test that explicitly scoped references to static members work even if
kono
parents:
diff changeset
2 // they belong to an inaccessible base.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 struct A
kono
parents:
diff changeset
5 {
kono
parents:
diff changeset
6 static int i1;
kono
parents:
diff changeset
7 int i2; // { dg-message "declared" }
kono
parents:
diff changeset
8 static void f1 ();
kono
parents:
diff changeset
9 void f2 ();
kono
parents:
diff changeset
10 };
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 struct B: private A { };
kono
parents:
diff changeset
13 struct C: public B
kono
parents:
diff changeset
14 {
kono
parents:
diff changeset
15 void g ()
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 ::A::i1 = 1;
kono
parents:
diff changeset
18 ::A::i2 = 1; // { dg-error "(access)|(context)" }
kono
parents:
diff changeset
19 ::A::f1 ();
kono
parents:
diff changeset
20 ::A::f2 (); // { dg-error "" }
kono
parents:
diff changeset
21 }
kono
parents:
diff changeset
22 };