gcc/testsuite/g++.dg/warn/deprecated-20.C
raw| 1 | // PR c++/116678 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-Os -pedantic" } |
| 4 | |
| 5 | struct S |
| 6 | { |
| 7 | [[deprecated]] S () { s = 1; } // { dg-bogus "'S::S\\\(\\\)' is deprecated" } |
| 8 | S (int x) { s = x; } // { dg-warning "C\\\+\\\+11 attributes only available with" "" { target c++98_only } .-1 } |
| 9 | ~S () {} |
| 10 | int s; |
| 11 | }; |
| 12 | |
| 13 | int |
| 14 | main () |
| 15 | { |
| 16 | } |