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