Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/lookup/scoped1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// Test that explicitly scoped references to static members work even if // they belong to an inaccessible base. struct A { static int i1; int i2; // { dg-message "declared" } static void f1 (); void f2 (); }; struct B: private A { }; struct C: public B { void g () { ::A::i1 = 1; ::A::i2 = 1; // { dg-error "(access)|(context)" } ::A::f1 (); ::A::f2 (); // { dg-error "" } } };