blob: 55ca0c53f58c24a3fb138bd8e331b971804c3ce4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Special g++ Options: -fexceptions
// excess errors test - XFAIL hppa*-*-* a29k-*-* sparc64-*-elf sh-*-* z8k-*-* arm-*-pe**-*
void my_unexpected() {
throw 42;
}
template <class T> int foo(T) throw (T) { throw "Hi"; }
main() {
set_unexpected (my_unexpected);
try {
foo(1);
} catch (int i) {
if (i == 42)
return 0;
}
return 1;
}
|