Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rlgvax!hadron!jsdy From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: net.lang.c,net.micro,net.micro.pc Subject: Re: weird C behavior Message-ID: <341@hadron.UUCP> Date: Thu, 27-Mar-86 22:48:16 EST Article-I.D.: hadron.341 Posted: Thu Mar 27 22:48:16 1986 Date-Received: Sat, 29-Mar-86 16:20:18 EST References: <557@utastro.UUCP> <436@umcp-cs.UUCP> <330@hadron.UUCP> <559@umcp-cs.UUCP> Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao) Organization: Hadron, Inc., Fairfax, VA Lines: 18 Keywords: strange, opaque, odd Xref: watmath net.lang.c:8304 net.micro:14163 net.micro.pc:7575 Summary: I yield. ;-) In article <559@umcp-cs.UUCP> chris@umcp-cs.UUCP (Chris Torek) writes: >In article <330@hadron.UUCP> jsdy@hadron.UUCP (Joseph S. D. Yao) writes: >>>On a 16 bit machine, this should read >>> printf("%ld\n", 36864); [me] >>Passed arguments should always be passed as an "int", I do believe. > ... According to K&R, a constant that >is too big to be an `int' is automatically considered a `long'; ... >For you ANSI C buffs, I quote from a year-old draft (the latest I >could find), section C.1.3.2, `Integer constants': Moral: check your sources (no pun intended?). We analysed this "weird behaviour" the same way; but I was wrong in calling it a compiler error. End of discussion. -- Joe Yao hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}