PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / c-c++-common / Wlogical-not-parentheses-2.c
blobba8dce84f5dfb5346543b230c7261eb5af8eca2a
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 r += !aaa == bbb;
16 ^~~~
17 ( )
18 { dg-end-multiline-output "" } */
19 return r;