gcc/testsuite/g++.dg/warn/Wreturn-6.C
raw| 1 | // PR c++/107310 |
| 2 | |
| 3 | // Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'. |
| 4 | |
| 5 | struct f |
| 6 | { |
| 7 | ~f(); |
| 8 | }; |
| 9 | |
| 10 | int foo(int t) { |
| 11 | f g; |
| 12 | switch (t) { |
| 13 | case 1: |
| 14 | return 1; |
| 15 | } |
| 16 | if (true) |
| 17 | throw 1; |
| 18 | } // { dg-bogus "control reaches end" } |