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
PR target/83368
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
Waddress-2.c
blob
4d927f67694302f4570af54e3505f057d5a304ee
1
/* PR c/48778 */
2
/* { dg-do compile } */
3
/* { dg-options "-Waddress" } */
4
5
#define NULL ((void *) 0)
6
7
#define M1(b) ((b) != NULL ? 0 : (b))
8
#define M2(b) ((b) == NULL ? 0 : (b))
9
#define M3(b) (NULL != (b) ? 0 : (b))
10
#define M4(b) (NULL == (b) ? 0 : (b))
11
12
int
13
func
(
int
b
)
14
{
15
if
(
M1
(&
b
) >
0
)
16
return
1
;
17
if
(
M2
(&
b
) >
0
)
18
return
2
;
19
if
(
M3
(&
b
) >
0
)
20
return
3
;
21
if
(
M4
(&
b
) >
0
)
22
return
4
;
23
return
0
;
24
}