3 An issue in variable-argument argument promotion. Most backends, when not using --std-cXX, omit integer promotion on explicitly variable cast arguments.
5 promotion: PROMOTE, NOPROMOTE
12 #if defined(__SDCC) && defined(PROMOTE)
14 #elif defined(__SDCC) && defined(NOPROMOTE)
21 receive(const char *s
, ...)
26 #if defined(__SDCC) && defined(NOPROMOTE) && !defined(__SDCC_pdk13) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15)
27 #if 0 // Bug #3172 not yet fixed.
28 ASSERT(va_arg(ap
, unsigned char) == 0x5a);
29 ASSERT(va_arg(ap
, unsigned char) == 0xa5);
32 ASSERT(va_arg(ap
, int) == 0x5a);
33 ASSERT(va_arg(ap
, int) == 0xa5);
41 receive(0, (unsigned char)0x5a, (unsigned char)0xa5);
43 unsigned char i1
= 0x5a;
44 unsigned char i2
= 0xa5;
45 receive(0, (unsigned char)i1
, (unsigned char)i2
);
47 unsigned char *p1
= &i1
;
48 unsigned char *p2
= &i2
;
49 receive(0, (unsigned char)(*p1
), (unsigned char)(*p2
));