URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run { xfail sparc64-*-elf z8k-*-* arm-*-pe } }
|
// { dg-do run { xfail sparc64-*-elf z8k-*-* arm-*-pe } }
|
// { dg-options "-fexceptions" }
|
// { dg-options "-fexceptions" }
|
|
|
#include
|
#include
|
|
|
void my_unexpected() {
|
void my_unexpected() {
|
throw 42;
|
throw 42;
|
}
|
}
|
|
|
void foo() throw (int) { throw "Hi"; }
|
void foo() throw (int) { throw "Hi"; }
|
|
|
int main() {
|
int main() {
|
std::set_unexpected (my_unexpected);
|
std::set_unexpected (my_unexpected);
|
try {
|
try {
|
foo();
|
foo();
|
} catch (int i) {
|
} catch (int i) {
|
if (i == 42)
|
if (i == 42)
|
return 0;
|
return 0;
|
}
|
}
|
return 1;
|
return 1;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.