3 type: signed char, int, long
9 {type
} add_func({type
} i
)
11 return(i
+ (5ul << 16));
17 {storage
} {attr
} {type
} left
, right
, result
;
29 ASSERT(result
== (39-120));
35 ASSERT(result
== (-39+80));
41 ASSERT(result
== (-39-70));
44 ASSERT(result
== ({type
})(0xab00-39-70));
49 result
= left
+ right
;
50 ASSERT(result
== ({type
})(0x5500 + 0x0a00));
54 result
= left
+ 0x0a0000ul
;
55 ASSERT(result
== ({type
})(0x550000ul
+ 0x0a0000ul
));
57 ASSERT(add_func(0) == ({type
})(5ul << 16));
63 #if !(defined (__SDCC_pdk15) && defined(__SDCC_STACK_AUTO)) // Lack of code memory
64 {storage
} {attr
} {type
} left
, right
, result
;
70 ASSERT(result
== (5-26));
76 ASSERT(result
== (39+76));
82 ASSERT(result
== (-12-56));
88 ASSERT(result
== (-39+20));
90 result
= left
-(signed)0x1200;
91 ASSERT(result
== ({type
})(-39-(signed)0x1200));