repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
bug-2859.c
blob
49cba1f3dd9ba1816a3f51f79fbb89eea089f3a6
1
/* bug-2859.c
2
Cannot compare function to 0.
3
*/
4
5
#include <testfwk.h>
6
7
void
8
a
(
void
)
9
{
10
/* empty */
11
}
12
13
typedef
void
(*
vf
)(
void
);
14
15
void
16
testBug
(
void
)
17
{
18
/* previously broken */
19
ASSERT
(
a
!=
0
);
20
ASSERT
(
a
!= ((
void
*)
0
));
21
ASSERT
(&
a
!=
0
);
22
ASSERT
(&
a
!= ((
void
*)
0
));
23
ASSERT
(!!
a
);
24
/* previously working */
25
ASSERT
((
vf
)
a
);
26
ASSERT
(((
void
*)
a
) !=
0
);
27
ASSERT
((
_Bool
)
a
);
28
}