gcc/testsuite/g++.dg/eh/no-exceptions1.C
raw| 1 | // PR c++/107198 |
| 2 | // { dg-additional-options -fno-exceptions } |
| 3 | |
| 4 | struct A { |
| 5 | A() { throw 0; } // { dg-error disabled } |
| 6 | A(int i) { throw i; } |
| 7 | A(const A&) { throw 10; } |
| 8 | }; |
| 9 | |
| 10 | void try_idx (int i) |
| 11 | { |
| 12 | int t = 10; |
| 13 | try { |
| 14 | struct X { |
| 15 | A e1[2], e2; |
| 16 | } |
| 17 | x2[3] = { { 1, 2, 3 }, { 4, 5, 6 } }; |
| 18 | } catch (int x) { t = x; } // { dg-prune-output "not declared" } |
| 19 | } |