Re: OT: Requesting C advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Mike McCarty wrote:

Those interested in historical matters might look here:

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

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux