OT: Requesting C advice

Les Mikesell lesmikesell at gmail.com
Wed May 30 19:53:13 UTC 2007


Mike McCarty wrote:
> 
> Those interested in historical matters might look here:
> http://cm.bell-labs.com/cm/cs/who/dmr/chist.html

OK but...

>> 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]
> 
> 5.2.4.2.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.

-- 
    Les Mikesell
     lesmikesell at gmail.com




More information about the users mailing list