gcc/testsuite/gdc.test/compilable/testpull1810.d
raw| 1 | // REQUIRED_ARGS: -c -w |
| 2 | /* |
| 3 | Warning removed in: https://github.com/dlang/dmd/pull/15568 |
| 4 | --- |
| 5 | fail_compilation/testpull1810.d(21): Warning: statement is not reachable |
| 6 | Error: warnings are treated as errors |
| 7 | Use -wi if you wish to treat warnings only as informational. |
| 8 | --- |
| 9 | */ |
| 10 | |
| 11 | uint foo(uint i) |
| 12 | { |
| 13 | try |
| 14 | { |
| 15 | ++i; |
| 16 | return 3; |
| 17 | } |
| 18 | catch (Exception e) |
| 19 | { |
| 20 | } |
| 21 | return 4; |
| 22 | } |