repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2015-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
Wbool-compare-3.c
blob
bac4f47c2a050294afc344d42d7503409da5f100
1
/* { dg-do compile } */
2
/* { dg-options "-Wbool-compare" } */
3
4
#ifndef __cplusplus
5
# define bool _Bool
6
#endif
7
8
#define A 0
9
#define B 1
10
11
int
12
foo
(
int
i
,
bool
b
)
13
{
14
int
r
=
0
;
15
16
r
+=
i
<= (
A
||
B
);
17
r
+=
i
<=
b
;
18
r
+=
i
<=
A
;
19
r
+=
i
< (
A
||
B
);
20
r
+=
i
<
b
;
21
r
+=
i
<
A
;
22
r
+=
i
> (
A
||
B
);
23
r
+=
i
>
b
;
24
r
+=
i
>
A
;
25
r
+=
i
>= (
A
||
B
);
26
r
+=
i
>=
b
;
27
r
+=
i
>=
A
;
28
29
return
r
;
30
}