struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2859.c
blob49cba1f3dd9ba1816a3f51f79fbb89eea089f3a6
1 /* bug-2859.c
2 Cannot compare function to 0.
3 */
5 #include <testfwk.h>
7 void
8 a(void)
10 /* empty */
13 typedef void (*vf)(void);
15 void
16 testBug(void)
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);