Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/c-c++-common/pr49706-2.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-Wlogical-not-parentheses" } */ | |
3 | |
4 /* Test that we don't warn if both operands of the comparison | |
5 are negated. */ | |
6 | |
7 #ifndef __cplusplus | |
8 #define bool _Bool | |
9 #endif | |
10 | |
11 bool r; | |
12 | |
13 int | |
14 same (int a, int b) | |
15 { | |
16 r = !a == !b; | |
17 r = !!a == !!b; | |
18 r = !!a == !b; | |
19 r = !a == !!b; | |
20 } |