Currently, when compiling using --std-sdcc89 or --std-sdcc99 (but not when using --std-c89, --std-c99 or --std-c11), sdcc does not do integer promotion on explicitly cast arguments to functions with variable arguments:
void f1(int, ...); char c; void f2(void) { f1(0, (char)c); // Will pass a char f1(0, c); // Will pass an int } This can save a byte on the stack when passing an argument of char to a functionw with variable arguments. However, it makes code compiled using different --std- options incompatible (will fail at run time). I assume char arguments to functions with variable arguments to be relatively rare, and the cases where the single byte on the stack matters even more so. In anyone using this feature? If not, I'd suggest to drop it after the next release. Philipp
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet
_______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user