blob: d1902f08106bd1fe6047e0a7a8308c262d89a966 [file] [log] [blame]
// { dg-do run { xfail sparc64-*-elf z8k-*-* arm-*-pe } }
// { dg-require-effective-target c++14_down }
// { dg-options "-fexceptions" }
#include <exception>
void my_unexpected() {
throw 42;
}
template <class T> void foo(T) throw (T) { throw "Hi"; } // { dg-warning "deprecated" "" { target c++11 } }
int
main() {
std::set_unexpected (my_unexpected); // { dg-warning "deprecated" "" { target c++11 } }
try {
foo(1);
} catch (int i) {
if (i == 42)
return 0;
}
return 1;
}