aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/scoped1.C
blob: 72694a222054d3b17825070bc32090b14c7bd413 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Test that explicitly scoped references to static members work even if
// they belong to an inaccessible base.

struct A
{
  static int i1;
  int i2;
  static void f1 ();
  void f2 ();
};

struct B: private A { };
struct C: public B
{
  void g ()
  {
    ::A::i1 = 1;
    ::A::i2 = 1;		// { dg-error "access" "" }
    ::A::f1 ();
    ::A::f2 ();			// { dg-error "" }
  }
};