This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


 > 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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]