URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [eh33.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do run { xfail sparc64-*-elf z8k-*-* arm-*-pe } }
// { dg-options "-fexceptions" }
#include <exception>
void my_unexpected() {
throw 42;
}
void foo() throw (int) { throw "Hi"; }
int main() {
std::set_unexpected (my_unexpected);
try {
foo();
} catch (int i) {
if (i == 42)
return 0;
}
return 1;
}