gcc/testsuite/g++.dg/cpp0x/depr-copy5.C
raw| 1 | // PR c++/106213 |
| 2 | // { dg-additional-options -Werror=deprecated-copy-dtor } |
| 3 | // { dg-prune-output "warnings being treated as errors" } |
| 4 | |
| 5 | struct s { |
| 6 | int* i; |
| 7 | s(); |
| 8 | ~s() { delete i; } |
| 9 | }; |
| 10 | |
| 11 | |
| 12 | void bar(){ |
| 13 | s instance; |
| 14 | s instance2 = instance; |
| 15 | // { dg-error "deprecated-copy-dtor" "" { target c++11 } .-1 } |
| 16 | } |