msalters wrote:
Maxim Yegorushkin schreef:
Nick Keighley wrote:
[]
it does, however, specify a minimum size. A char is at least 8 bits, an
at leat 16 bits and a long at least 32 bits. There are similar promises
for floating point types. Unsigned are the same size as their
corresponding signed types
It does not.
It only states that:
sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)
It also states that these must be implemnted in some kind of binary
system, and that the ranges are at least (-127,127), (-32767,32767)
and so on. (by reference from C90)
C++ standard does not state that. C does indeed.
However, Derek M. Jones in his book "The New C Standard" quotes:
Resolutions Prepared at the Eleventh Plenary Meeting of
ISO/IEC JTC 1/SC22 Snekkersten, Denmark
August 24 27, 1998
Resolution 98-6: Relationship Between the Work of WG21 and that of WG14
Recognizing that the user communities of the C and C++ languages are
becoming increasingly divergent, ISO/IEC JTC 1/SC22 authorizes WG21 to
carry out future revisions of ISO/IEC 14882:1998 (Programming Language
C++) without necessarily adopting new C language features contained in
the current revision to ISO/IEC 9899:1990 (Programming Language C) or
any future revisions thereof.
ISO/IEC JTC 1/SC22 encourages WG14 and WG21 to continue their close
cooperation in the future.