]>
Commit | Line | Data |
---|---|---|
ebef225f MP |
1 | /* { dg-do compile } */ |
2 | /* { dg-options "-Wlogical-not-parentheses -fdiagnostics-show-caret" } */ | |
3 | ||
4 | /* Test fixit hints. */ | |
5 | ||
6 | int | |
7 | foo (int aaa, int bbb) | |
8 | { | |
9 | int r = 0; | |
10 | r += (!aaa) == bbb; | |
11 | r += !aaa == bbb; /* { dg-warning "logical not is only applied" } */ | |
12 | /* { dg-begin-multiline-output "" } | |
13 | r += !aaa == bbb; | |
14 | ^~ | |
985d6480 DM |
15 | { dg-end-multiline-output "" } */ |
16 | /* { dg-begin-multiline-output "" } | |
ebef225f MP |
17 | r += !aaa == bbb; |
18 | ^~~~ | |
19 | ( ) | |
20 | { dg-end-multiline-output "" } */ | |
21 | return r; | |
22 | } |