MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail4375s.d
blob972f27643af174c66a9fb8650b0428d18ae06e5f
1 // REQUIRED_ARGS: -w
2 // https://issues.dlang.org/show_bug.cgi?id=4375: Dangling else
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail4375s.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375s.d(13)
7 Error: warnings are treated as errors
8 Use -wi if you wish to treat warnings only as informational.
9 ---
12 void main() {
13 if (true)
14 try
15 assert(106);
16 catch(Exception e)
17 if (true)
18 assert(107);
19 else
20 assert(108);