| 1 |
// PR c++/104682 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
template<typename> |
| 5 |
struct S { |
| 6 |
enum B { |
| 7 |
A |
| 8 |
} __attribute__((deprecated)) ; |
| 9 |
}; |
| 10 |
|
| 11 |
struct S2 { |
| 12 |
enum B { |
| 13 |
A |
| 14 |
} __attribute__((deprecated)); |
| 15 |
}; |
| 16 |
|
| 17 |
template<typename> |
| 18 |
struct S3 { |
| 19 |
enum [[deprecated]] B { |
| 20 |
A |
| 21 |
}; |
| 22 |
}; |
| 23 |
|
| 24 |
struct S4 { |
| 25 |
enum [[deprecated]] B { |
| 26 |
A |
| 27 |
}; |
| 28 |
}; |
| 29 |
|
| 30 |
void |
| 31 |
g () |
| 32 |
{ |
| 33 |
S<int>::B a1; // { dg-warning "is deprecated" } |
| 34 |
S2::B a2; // { dg-warning "is deprecated" } |
| 35 |
S3<int>::B a3; // { dg-warning "is deprecated" } |
| 36 |
S4::B a4; // { dg-warning "is deprecated" } |
| 37 |
} |