Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/nested-namespace-def1.C

raw
1 // { dg-do compile { target c++17 } }
2 // { dg-options "" }
3
4 namespace A::B::C
5 {
6 struct X {};
7 namespace T::U::V { struct Y {}; }
8 }
9
10 A::B::C::X x;
11 A::B::C::T::U::V::Y y;
12
13 inline namespace D::E {} // { dg-error "cannot be inline" }
14
15 namespace F::G:: {} // { dg-error "namespace name required" }
16
17 namespace G __attribute ((visibility ("default"))) ::H {} // { dg-error "cannot have attributes" }
18
19 namespace H [[deprecated]] ::I {} // { dg-error "cannot have attributes|ignored" }
20
21 namespace __attribute ((visibility ("default"))) I::J {} // { dg-error "cannot have attributes" }
22
23 namespace [[deprecated]] J::K {} // { dg-error "cannot have attributes|ignored" }
24