Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!ukc!warwick!nott-cs!peter.cs.bham.ac.uk!cjr From: cjr@cs.bham.ac.uk (Chris Ridd ) Newsgroups: comp.lang.c Subject: Passing longs 'old-style' Message-ID: <940@peter.cs.bham.ac.uk> Date: 24 Mar 90 15:34:33 GMT References: <1990Mar19.163550.8685@craycos.com> Reply-To: cjr@peter.UUCP (Chris Ridd ) Organization: University of Birmingham, England Lines: 17 In ANSI C, parameters in a variable argument list undergo 'integral promotion', and each float argument is converted to double. This is the same as for 'old-style' functions. Integral promotion converts a character, short, or bit-field to an int if possible, otherwise to an unsigned int. In a situation where sizeof(long) > sizeof(int), how does the integral promotion work if a long is passed 'old-style'? What effect does casting have on the arguments? Chris -- Chris Ridd, Computer Science, Birmingham Uni, UK -- RiddCJ@Cs.Bham.Ac.Uk -- "'It's going to look pretty good, then, isn't it,' said War testily, 'the One Horseman and Three Pedestrians of the Apocralypse.'" - Sourcery