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