Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.lang.c Subject: Re: Absolute size of 'short' Keywords: unsigned wrap-around Message-ID: <62505@sun.uucp> Date: 2 Aug 88 20:56:47 GMT References: <214@ISIDAPS5.UUCP> <9641@dartvax.Dartmouth.EDU> Sender: news@sun.uucp Lines: 9 > No. I have seen at least one compiler where sizeof(short) is one > byte. In which case the vendor of the compiler either 1) won't make it ANSI C-conformant or 2) will make "sizeof (short)" two bytes (assuming 8-bit bytes here; if bytes are 16 bits they're safe). The January 11, 1988 ANSI C draft indicates that a "short int" must be able to hold values in the range -32767 to 32767; it may be able to hold values outside that range, but it must be able to hold values inside that range.