Les Mikesell wrote:
Mike McCarty wrote:
Those interested in historical matters might look here:
Actually, that was a huge bone of contention in the committee meetings.
The 16-bit integer was the "native" size of the registers on the machine
that C was developed on (the PDP-11), so it sorta stuck. However, the
standard makes absolutely no guarantees on how big an "int" is. It is
completely up to the implementer of the compiler as to how big an "int"
is (or a "char" is or an "unsigned long long" is...that's why the
"sizeof" operator exists).
This is incorrect. An integer must be able to represent at least
numbers in the range -32767 to 32767 inclusive.
[QUOTE MODE ON]
126.96.36.199.1 Sizes of integer types <limits.h>
A quote from a 1989 standard? What were integers between 1973 and 1989?
The language was well established before any committee meetings.
A quote from a 1999 standard, actually. I was responding to the
words above "However, THE STANDARD [emphasis added] makes absolutely no
guarantees on how big an 'int' is. It is completely up to the
implementer of the compiler as to how big an 'int' is (or a 'char' is
or an 'unsigned long long' is...that's why the 'sizeof' operator
Note the present tense used. This claim is incorrect. The Standard
makes very definite statements about the sizes of integral types, in
terms of what they are guaranteed to be able to represent.
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!