PR c++/79143
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / nested-namespace-def1.C
blob39801742d09d0722cb7ae57b71526fa971a21367
1 // { dg-options "-std=c++1z" }
3 namespace A::B::C
5         struct X {};
6         namespace T::U::V { struct Y {}; }
9 A::B::C::X x;
10 A::B::C::T::U::V::Y y;
12 inline namespace D::E {} // { dg-error "cannot be inline" }
14 namespace F::G:: {} // { dg-error "nested identifier required" }
16 namespace G __attribute ((visibility ("default"))) ::H {} // { dg-error "cannot have attributes" }
18 namespace H [[deprecated]] ::I {} // { dg-error "cannot have attributes|ignored" }
20 namespace __attribute ((visibility ("default"))) I::J {} // { dg-error "cannot have attributes" }
22 namespace [[deprecated]] J::K {} // { dg-error "cannot have attributes|ignored" }