8 #define CP (void __code*)0x1234
9 #define XP (void __xdata*)0x5678
12 varargs_fn (char k
, ...)
21 cp
= va_arg (arg
, void __code
*);
23 xp
= va_arg (arg
, void __xdata
*);
25 gp
= va_arg (arg
, void *);
26 ASSERT (gp
== (void *)CP
);
27 #if defined(__SDCC_hc08) || defined(__SDCC_s08)
28 /* bug 2713 - casting literal pointer to generic pointer modified upper bits */
29 ASSERT ((int)gp
== 0x1234);
31 gp
= va_arg (arg
, void *);
32 ASSERT (gp
== (void *)XP
);
40 void __code
* cp
= CP
;
41 void __xdata
* xp
= XP
;
43 varargs_fn('k', (void __code
*)cp
, (void __xdata
*)xp
, cp
, xp
);