PR c++/89511 - ICE with using-declaration and unscoped enumerator.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / using-enum-3.C
blobedc16890cb1aa42004b38c10f87016a22935921f
1 // PR c++/89511
2 // { dg-do compile { target c++11 } }
4 void f ()
6   enum e { a };
7   using e::a; // { dg-error "not a namespace or unscoped enum" }
10 struct S {
11   enum E { A };
12   using E::A; // { dg-error "type .S. is not a base type for type .S." }
15 namespace N {
16   enum E { B };
19 struct T {
20   using N::E::B; // { dg-error "using-declaration for non-member at class scope" }