rt_gccstream/gcc/testsuite/g++.dg/eh/pr41819.C

22 lines
222 B
C

// { dg-do compile }
// { dg-options "-fno-exceptions" }
struct S { ~S(); };
extern void bar();
void f0()
{
S s;
bar();
}
void f1()
{
try {} catch (...) {} // { dg-error "" }
}
void f2() throw(int)
{
bar();
}