Just as an update, about the INT32_MIN bug:

1) The engineer says that technically, the compiler is doing the "right 
thing" according to the spec (but see 2 below for the fix).  Apparently, 
there is no such thing as a "negative integer constant", only a positive 
integer constant that is negated.  So positive 2147483648 really doesn't 
fit in an integer, so it is promoted to unsigned.  Then, the negative of 
an unsigned is still unsigned.

2) A newer version of the compiler will promote 2147483648 to a long long,
  and the negation would then be correct.  However, there would still be a 
problem with INT64_MIN.  So, stdint.h will probably be changed on Mac OS X 
to something like:

        #define INT32_MIN       (-INT32_MAX - 1)
        #define INT64_MIN       (-INT64_MAX - 1)

--------------------------------------------------------------------------
Edward Moy
Apple Computer, Inc.
[EMAIL PROTECTED]

(This message is from me as a reader of this list, and not a statement
from Apple.)

Reply via email to