summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/visibility/warn2.C
blob: 475179fd64be182838a053c4100ad786ee3aceb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Complain when a class is specified with greater visibility than one of
// its members' types or bases.

// { dg-require-visibility "" }

namespace N __attribute ((__visibility__ ("hidden")))
{
  struct A { };
}

struct B			// { dg-warning "visibility" }
{
  N::A a;
};

struct C: public N::A { };	// { dg-warning "visibility" }