Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tdatirv!sarima From: sarima@tdatirv.UUCP (Stanley Friesen) Newsgroups: comp.lang.c Subject: Re: Style guides and portability Message-ID: <90@tdatirv.UUCP> Date: 22 Jan 91 16:27:08 GMT References: <14824@smoke.brl.mil> <1991Jan13.182655.17672@athena.mit.edu> <1332@geovision.UUCP> Reply-To: sarima@tdatirv.UUCP (Stanley Friesen) Distribution: comp Organization: Teradata Corp., Irvine Lines: 14 In article <1332@geovision.UUCP> pt@geovision.gvc.com writes: >scs@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)