Fix various issues of -ftrivial-auto-var-init=zero with Ada
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / nested-namespace-def1.C
blobc9b16dfacedceb6d62ab498d76bef8c7c7538617
1 // { dg-do compile { target c++17 } }
2 // { dg-options "" }
4 namespace A::B::C
6         struct X {};
7         namespace T::U::V { struct Y {}; }
10 A::B::C::X x;
11 A::B::C::T::U::V::Y y;
13 inline namespace D::E {} // { dg-error "cannot be inline" }
15 namespace F::G:: {} // { dg-error "namespace name required" }
17 namespace G __attribute ((visibility ("default"))) ::H {} // { dg-error "cannot have attributes" }
19 namespace H [[deprecated]] ::I {} // { dg-error "cannot have attributes|ignored" }
21 namespace __attribute ((visibility ("default"))) I::J {} // { dg-error "cannot have attributes" }
23 namespace [[deprecated]] J::K {} // { dg-error "cannot have attributes|ignored" }