1 // { dg-do compile { target c++11 } }
2 // { dg-options "-Wno-attributes=bar:: -Wno-attributes=baz::qux" }
4 [[foo::bar]]; // { dg-warning "attribute ignored" }
5 [[bar::foo, foo::bar, baz::qux]]; // { dg-warning "attribute ignored" }
6 [[bar::foo, bar::bar, baz::qux]]; // { dg-bogus "attribute ignored" }
8 namespace [[foo::bar]] N { // { dg-warning "'bar' attribute directive ignored" }
11 namespace [[bar::foo, foo::bar, baz::qux]] O { // { dg-warning "'bar' attribute directive ignored" }
14 namespace [[bar::foo, bar::bar, baz::qux]] P { // { dg-bogus "attribute directive ignored" }
22 [[foo::bar]]; // { dg-warning "attributes at the beginning of statement are ignored" }
23 [[bar::foo, foo::bar, baz::qux]]; // { dg-warning "attributes at the beginning of statement are ignored" }
24 [[bar::foo, bar::bar, baz::qux]]; // { dg-bogus "attributes at the beginning of statement are ignored" }
25 [[foo::bar]] ++i; // { dg-warning "attributes at the beginning of statement are ignored" }
26 [[bar::foo, foo::bar, baz::qux]] ++i; // { dg-warning "attributes at the beginning of statement are ignored" }
27 [[bar::foo, bar::bar, baz::qux]] ++i; // { dg-bogus "attributes at the beginning of statement are ignored" }
28 [[foo::bar]] asm (""); // { dg-warning "attributes ignored on 'asm' declaration" }
29 [[bar::foo, foo::bar, baz::qux]] asm (""); // { dg-warning "attributes ignored on 'asm' declaration" }
30 [[bar::foo, bar::bar, baz::qux]] asm (""); // { dg-bogus "attributes ignored on 'asm' declaration" }
31 [[foo::bar]] using namespace N; // { dg-warning "'bar' attribute directive ignored" }
32 [[bar::foo, foo::bar, baz::qux]] using namespace O; // { dg-warning "'bar' attribute directive ignored" }
33 [[bar::foo, bar::bar, baz::qux]] using namespace P; // { dg-bogus "attribute directive ignored" }
38 [[foo::bar]] friend int bar (S &); // { dg-warning "attribute ignored" }
39 // { dsg-message "an attribute that appertains to a friend declaration that is not a definition is ignored" "" { target *-*-* } .-1 }
40 [[bar::foo, foo::bar, baz::qux]] friend int baz (S &); // { dg-warning "attribute ignored" }
41 // { dsg-message "an attribute that appertains to a friend declaration that is not a definition is ignored" "" { target *-*-* } .-1 }
42 [[bar::foo, bar::bar, baz::qux]] friend int qux (S &); // { dg-warning "attribute ignored" }
43 // { dsg-message "an attribute that appertains to a friend declaration that is not a definition is ignored" "" { target *-*-* } .-1 }
48 int [[foo::bar]] i; // { dg-warning "attribute ignored" }
49 // { dg-message "an attribute that appertains to a type-specifier is ignored" "" { target *-*-* } .-1 }
50 int [[bar::foo, foo::bar, baz::qux]] j; // { dg-warning "attribute ignored" }
51 // { dg-message "an attribute that appertains to a type-specifier is ignored" "" { target *-*-* } .-1 }
52 int [[bar::foo, bar::bar, baz::qux]] k; // { dg-bogus "attribute ignored" }