aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr49706-2.c
blob: 30a46c286e0e4ab48bf48b6d5355a44969aec45a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-Wlogical-not-parentheses" } */

/* Test that we don't warn if both operands of the comparison
   are negated.  */

#ifndef __cplusplus
#define bool _Bool
#endif

bool r;

void
same (int a, int b)
{
  r = !a == !b;
  r = !!a == !!b;
  r = !!a == !b;
  r = !a == !!b;
}