| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
// A C++11 attribute cannot appear in the middle of the decl-specifier-seq, |
| 3 |
// only before it (in which case it appertains to the declaration) or at |
| 4 |
// the end (in which case it appertains to the type). |
| 5 |
|
| 6 |
struct S { |
| 7 |
friend [[deprecated]] void; // { dg-error "standard attributes in middle of decl-specifiers" } |
| 8 |
friend [[deprecated]] int fn(); // { dg-error "standard attributes in middle of decl-specifiers" } |
| 9 |
// { dg-warning "attribute ignored" "" { target *-*-* } .-1 } |
| 10 |
}; |