gcc/testsuite/g++.old-deja/g++.mike/eh34.C
raw| 1 | // { dg-do run { xfail sparc64-*-elf arm-*-pe } } |
| 2 | // { dg-require-effective-target c++14_down } |
| 3 | |
| 4 | #include <exception> |
| 5 | #include <stdlib.h> |
| 6 | |
| 7 | void my_unexpected() { |
| 8 | exit (0); |
| 9 | } |
| 10 | |
| 11 | void foo() throw () { throw "Hi"; } |
| 12 | |
| 13 | int main() { |
| 14 | std::set_unexpected (my_unexpected); // { dg-warning "deprecated" "" { target c++11 } } |
| 15 | foo(); |
| 16 | return 1; |
| 17 | } |