Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / c-c++-common / pr62199-2.c
blob5d25a0ac6d5a954713e1a824dc6ab4b9a25c58cb
1 /* PR c++/62199 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wlogical-not-parentheses" } */
5 #ifndef __cplusplus
6 # define bool _Bool
7 #endif
9 bool r;
11 void
12 foo (bool b)
14 r = !b == 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
15 r = !b != 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
16 r = !b > 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
17 r = !b >= 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
18 r = !b < 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
19 r = !b <= 1; /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */