This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: middle-end/6694: Warning that largest negative int -2147483648 in comparison is unsigned
- From: sirl at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, rocky at panix dot com
- Date: 17 May 2002 14:13:30 -0000
- Subject: Re: middle-end/6694: Warning that largest negative int -2147483648 in comparison is unsigned
- Reply-to: sirl at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, rocky at panix dot com, gcc-gnats at gcc dot gnu dot org
Synopsis: Warning that largest negative int -2147483648 in comparison is unsigned
State-Changed-From-To: open->closed
State-Changed-By: sirl
State-Changed-When: Fri May 17 07:13:28 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.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6694