]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/c-c++-common/Wlogical-not-parentheses-2.c
testsuite: move handle-multiline-outputs to before check for blank lines
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / Wlogical-not-parentheses-2.c
CommitLineData
ebef225f
MP
1/* { dg-do compile } */
2/* { dg-options "-Wlogical-not-parentheses -fdiagnostics-show-caret" } */
3
4 /* Test fixit hints. */
5
6int
7foo (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}