short vs. long
Rex Jaeschke
rex at aussie.UUCP
Mon May 22 04:27:33 AEST 1989
> The current draft of the standard does not require that the sizeof short is
> less than or equal to the sizeof int; nor that sizeof int is less than or
> equal to sizeof long.
This is one of those "by a careful reading of the draft" type
questions. Page 23 lines 36-43 states that "... the range of values of
each type [signed char, short, int, long] is a subrange of the values
of the next type in the list."
Page 24 line 2 requires unsigned versions to have the same size as
signed counterparts.
Certainly, the situation with the fp types is far more obvious in
lines 10-11.
Rex
----------------------------------------------------------------------------
Rex Jaeschke | C Users Journal | Journal of C Language Translation
(703) 860-0091 | DEC PROFESSIONAL |1810 Michael Faraday Drive, Suite 101
uunet!aussie!rex | Programmers Journal | Reston, Virginia 22090, USA
----------------------------------------------------------------------------
More information about the Comp.std.c
mailing list