Re: Strange enum type conversion

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

 



On Thu, 2009-12-03 at 14:40 +0000, Richard Earnshaw wrote:

> > 0xFFFFFFFF (which is an unsigned int)
> 
> wrong.  That's an int with a bit pattern that's all 1's.  On a two's
> complement machine with 32-bit ints that's equivalent to -1.

Forget that.  I'm talking nonsense.  An int is signed only if it's
smaller than INT_MAX in magnitude.  Otherwise it's unsigned (hence
#defining INT_MIN as (-INT_MAX - 1)

R.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux