OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
84ccaddb9a9e74f213ddc045b4a3545c672a2c67
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
eh50.C
1
// Special g++ Options: -fexceptions
2
// excess errors test - XFAIL hppa*-*-* a29k-*-* sparc64-*-elf z8k-*-* arm-*-pe
3
4
#include <exception>
5
6
void my_unexpected() {
7
throw 42;
8
}
9
10
template <class T> int foo(T) throw (int) { throw "Hi"; }
11
12
main() {
13
std::set_unexpected (my_unexpected);
14
try {
15
foo(1);
16
} catch (int i) {
17
if (i == 42)
18
return 0;
19
}
20
return 1;
21
}