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 ^~
15 r += !aaa == bbb;
16 ^~~~
17 ( )
18 { dg-end-multiline-output "" } */
19 return r;
20 }