aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/nested-namespace-def1.C
blob: c9b16dfacedceb6d62ab498d76bef8c7c7538617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// { dg-do compile { target c++17 } }
// { dg-options "" }

namespace A::B::C
{
	struct X {};
	namespace T::U::V { struct Y {}; }
}

A::B::C::X x;
A::B::C::T::U::V::Y y;

inline namespace D::E {} // { dg-error "cannot be inline" }

namespace F::G:: {} // { dg-error "namespace name required" }

namespace G __attribute ((visibility ("default"))) ::H {} // { dg-error "cannot have attributes" }

namespace H [[deprecated]] ::I {} // { dg-error "cannot have attributes|ignored" }

namespace __attribute ((visibility ("default"))) I::J {} // { dg-error "cannot have attributes" }

namespace [[deprecated]] J::K {} // { dg-error "cannot have attributes|ignored" }