Handle symbol visibility/locality for PIE/PIC
[official-gcc.git] / gcc / testsuite / c-c++-common / pr62199-2.c
blob7647f16042bd92ef256d803d56d320018a41e6c8
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-warning "logical not is only applied to the left hand side of comparison" } */
15 r = !b != 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
16 r = !b > 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
17 r = !b >= 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
18 r = !b < 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */
19 r = !b <= 1; /* { dg-warning "logical not is only applied to the left hand side of comparison" } */