middle-end/6694: Warning that largest negative int -2147483648 in comparison is unsigned

R. Bernstein rocky@panix.com
Sat May 18 11:04:00 GMT 2002


 > State-Changed-Why:
 >     Not a bug. There are no negative constants in C.
 >     The constant overflows 'int' (thus the warning) and then the negation is applied as an operation.


I think there would be less confusion then if the warning message were
changed to

  warning: positive decimal constant is so large that it is unsigned
                    ^^^^^^^

Or even better 

  warning: positive decimal constant 2147483648 is so large that it is unsigned

(where 2147483648 is of course substituted in from the offending value).



More information about the Gcc-bugs mailing list