| 1 |
// PR c++/101582 |
| 2 |
// { dg-do compile } |
| 3 |
// { dg-options "-pedantic -Wno-extra-semi" } |
| 4 |
|
| 5 |
; |
| 6 |
[[]] [[]] [[]]; // { dg-warning "attributes only available with" "" { target c++98_only } } |
| 7 |
[[foobar]]; // { dg-warning "attribute ignored" } |
| 8 |
// { dg-warning "attributes only available with" "" { target c++98_only } .-1 } |
| 9 |
|
| 10 |
extern "C" ; |
| 11 |
extern "C" [[]]; // { dg-warning "attributes only available with" "" { target c++98_only } } |
| 12 |
extern "C" extern "C" ; |
| 13 |
extern "C" extern "C" [[]][[]][[]]; // { dg-warning "attributes only available with" "" { target c++98_only } } |
| 14 |
__extension__ ; |
| 15 |
__extension__ [[]]; |
| 16 |
__extension__ __extension__ ; |
| 17 |
__extension__ __extension__ [[]][[]]; |
| 18 |
|
| 19 |
namespace N { |
| 20 |
|
| 21 |
; |
| 22 |
[[]] [[]] [[]]; // { dg-warning "attributes only available with" "" { target c++98_only } } |
| 23 |
[[foobar]]; // { dg-warning "attribute ignored" } |
| 24 |
// { dg-warning "attributes only available with" "" { target c++98_only } .-1 } |
| 25 |
|
| 26 |
extern "C" ; |
| 27 |
extern "C" [[]]; // { dg-warning "attributes only available with" "" { target c++98_only } } |
| 28 |
extern "C" extern "C" ; |
| 29 |
extern "C" extern "C" [[]][[]][[]]; // { dg-warning "attributes only available with" "" { target c++98_only } } |
| 30 |
__extension__ ; |
| 31 |
__extension__ [[]]; |
| 32 |
__extension__ __extension__ ; |
| 33 |
__extension__ __extension__ [[]][[]]; |
| 34 |
|
| 35 |
} |