Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / attributes-namespace2.C
blob08a043a24e329b39130ab2e1780a5643ecd987f7
1 // PR c++/79817 - attribute deprecated on namespace.
2 // { dg-do compile { target c++11 } }
4 namespace [[deprecated]] { // { dg-warning "ignoring .deprecated. attribute on anonymous namespace" }
5   int nn;
8 inline namespace [[deprecated]] I { 
9   int x;
12 namespace M {
13   int y;
14   inline namespace [[deprecated]] N {
15     int x;
16   }
19 void
20 g ()
22   nn = 42;
23   I::x = 42; // { dg-warning ".I. is deprecated" }
24   M::x = 42;
25   M::y = 42;
26   M::N::x = 42; // { dg-warning ".M::N. is deprecated" }