Absolute size of 'short'
Guy Harris
guy at gorodish.Sun.COM
Wed Aug 3 06:56:47 AEST 1988
> 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.
More information about the Comp.lang.c
mailing list