Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/scoping6.C

raw
1 // { dg-do assemble }
2 // Testcase for all uses of explicit global scope.
3
4 int a, B;
5
6 struct A { };
7 int operator+(A&, int);
8
9 struct B {
10 struct C {
11 static int a;
12 static int f () { A a; return ::operator+ (a, ::a); } // { dg-bogus "" }
13 };
14 };
15
16 int B::C::a = 0;
17
18 struct D : public ::B::C { }; // { dg-bogus "" }
19
20 void f ()
21 {
22 int B;
23 ::B::C b;
24
25 B = ::B::C::a; // { dg-bogus "" }
26 B = ::B::C::f(); // { dg-bogus "" }
27 }