------- Comment #1 from schwab at suse dot de  2007-03-13 20:22 -------
0x80000000 is of type unsigned int, negating it gives an unsigned int of the
same value, converted to long long still gives the same positive value.  On the
other hand 2147483648 is of type long long (in C99) because it does not fit in
long, and gives -2147483648 as long long when negated.  C90 does not have long
long, so 2147483648 is undefined behaviour, and GCC chooses unsigned long since
it fits there.


-- 

schwab at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31166

Reply via email to