From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16244 invoked by alias); 30 Sep 2010 18:30:24 -0000 Received: (qmail 16229 invoked by uid 22791); 30 Sep 2010 18:30:23 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID 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, 30 Sep 2010 18:30:19 +0000 From: "MichieldeB at aim dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/45831] 0 = 10 (with -O0, 0 = 0 with -O1, but 10 = 10 expected) 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: MichieldeB at aim 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: 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 Date: Thu, 30 Sep 2010 21:10:00 -0000 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: 2010-09/txt/msg03293.txt.bz2 Message-ID: <20100930211000.OyrQczNljpG9eCycDdYPtHrVfbSoisInLfVnDFPaEs8@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45831 --- Comment #14 from Michiel 2010-09-30 18:30:16 UTC --- Remove signed/unsigned warnings, or even overflow warnings, for constants that are used in an expression with the following operations only: casts to integral type of smaller or equal size, casts to boolean, !, == and !=, casts from boolean to integral type, ? :, + - * << & | ^. Probably I missed some, but I hope you see what I mean. Then you will understand that /, %, >> and casts to larger integral type (or float, double) do not belong to this list. Is that really too hard?