view gcc/testsuite/g++.dg/cpp1z/nested-namespace-def1.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// { 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" }