| 1 |
// PR c++/120569 |
| 2 |
// { dg-do compile } |
| 3 |
// { dg-options "" } |
| 4 |
// { dg-additional-options "-pedantic" { target c++14 } } |
| 5 |
|
| 6 |
namespace U { |
| 7 |
struct A {}; |
| 8 |
struct A override {}; // { dg-warning "extended initializer lists only available with" "" { target c++98_only } } |
| 9 |
} |
| 10 |
namespace V { |
| 11 |
template <int N> |
| 12 |
struct B {}; |
| 13 |
template <int N> |
| 14 |
struct B<N> override {}; // { dg-warning "extended initializer lists only available with" "" { target c++98_only } } |
| 15 |
} // { dg-warning "variable templates only available with" "" { target c++11_down } .-1 } |
| 16 |
struct C { |
| 17 |
struct D {}; |
| 18 |
struct D override {}; // { dg-warning "extended initializer lists only available with" "" { target c++98_only } } |
| 19 |
}; // { dg-warning "non-static data member initializers only available with" "" { target c++98_only } .-1 } |
| 20 |
namespace W { |
| 21 |
struct E { struct F {}; }; |
| 22 |
struct E::F override {}; // { dg-warning "extended initializer lists only available with" "" { target c++98_only } } |
| 23 |
} |
| 24 |
template <int N> |
| 25 |
struct V::B<N> override {}; // { dg-warning "extended initializer lists only available with" "" { target c++98_only } } |
| 26 |
// { dg-warning "variable templates only available with" "" { target c++11_down } .-1 } |