Re: Strange enum type conversion

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

 



Hi Richard,

> Forget that.  I'm talking nonsense.

No harm, no foul.  :-)

> An int is signed only if it's smaller than INT_MAX in magnitude.

And as long as it doesn't exceed UINT_MAX.  Normal promotion rules apply.

> Otherwise it's unsigned (hence #defining INT_MIN as (-INT_MAX - 1)

On a 2's complement machine.

On a 1's complement, #define INT_MIN (-INT_MAX)

Sincerely,
--Eljay



[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