analyzer: enable taint state machine by default [PR103533]
[official-gcc.git] / gcc / testsuite / c-c++-common / Wlogical-not-parentheses-2.c
blob2d9382014c43a323cc7b43a3be315f09b66d3b9f
1 /* { dg-do compile } */
2 /* { dg-options "-Wlogical-not-parentheses -fdiagnostics-show-caret" } */
4 /* Test fixit hints. */
6 int
7 foo (int aaa, int bbb)
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;
15 { dg-end-multiline-output "" } */
16 /* { dg-begin-multiline-output "" }
17 r += !aaa == bbb;
18 ^~~~
19 ( )
20 { dg-end-multiline-output "" } */
21 return r;