This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52661] negative maxint for long long gives warning
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Mar 2012 06:15:48 +0000
- Subject: [Bug c/52661] negative maxint for long long gives warning
- Auto-submitted: auto-generated
- References: <bug-52661-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52661
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-22 06:15:48 UTC ---
(In reply to comment #3)
> you are not paying attention to the issue. the issue is that this constant is
> causing a compiler warning when it should not, and the compiler is treating a
> valid signed constant as an unsigned integer.
No please re-read my comments. There are two tokens there and the second token
the integer constant is too large to fit into a signed long long. This is
where the warning comes from. The negative sign is a separate token in C90/C99
from the integer constant.