From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18053 invoked by alias); 22 Mar 2012 07:06:48 -0000 Received: (qmail 17915 invoked by uid 22791); 22 Mar 2012 07:06:46 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_JM X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Mar 2012 07:06:33 +0000 From: "jmichae3 at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/52661] negative maxint for long long gives warning Date: Thu, 22 Mar 2012 07:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jmichae3 at yahoo dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg01787.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52661 --- Comment #8 from Jim Michaels 2012-03-22 07:06:31 UTC --- I think if I understand you correctly, you are saying that the integer and the earlier code I tried did NOT use the L suffix. I didn't get an warning then. which is as it should be. but when I specified L or LL (which is the only thing you CAN do for really long numbers like 64-bit integers, either of those suffixes with what should be a valid signed integer value gives a warning as you say. maxint64-bug2.cpp:6:5: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] maxint64-bug2.cpp:7:19: warning: integer constant is so large that it is unsigned [enabled by default] maxint64-bug2.cpp:7:5: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] the last 2 warnings are for the 64-bit integer using LL and the first one is for the 32-bit one using L. granted,it's not very often a person should want to use values like these, but when someone wants to use them, but when they want to use them, they should be available. did someone mess up on the specification?