Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / eh / uncaught4.C
blob227d11b330bbb35cc6e72a13b9cabe816bc0f84f
1 // PR c++/41174
2 // { dg-do run }
4 #include <exception>
6 #define assert(E) if (!(E)) __builtin_abort();
8 struct e {
9   e()
10   {
11     assert( !std::uncaught_exception() );
12     try {
13       throw 1;
14     } catch (int i) {
15       assert( !std::uncaught_exception() );
16       throw;
17     }
18   }
21 int main()
23   try {
24     throw e();
25   } catch (int i) {
26     assert( !std::uncaught_exception() );
27   }
28   assert( !std::uncaught_exception() );