Style guides and portability

Stanley Friesen sarima at tdatirv.UUCP
Wed Jan 23 03:27:08 AEST 1991


In article <1332 at geovision.UUCP> pt at geovision.gvc.com writes:
>scs at adam.mit.edu (Steve Summit) writes:
>If I remember correctly, variadic functions are type promoted the same way
>classic C functions are, integer types (char, int, unsigned, etc) are 
>promoted to long, real types (float, double) are promoted to double.

BEEP, you remember wrong.  Even for classic C you are wrong.
The 'short' integer types (char, short) are promoted to int, but
int is not (and never was) promoted to long (at least in funtion calls).

If int had been promoted to long, the %ld would be unnecessary.
-- 
---------------
uunet!tdatirv!sarima				(Stanley Friesen)



More information about the Comp.lang.c mailing list