From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14760 invoked by alias); 6 Jan 2015 15:23:58 -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 Received: (qmail 14730 invoked by uid 48); 6 Jan 2015 15:23:54 -0000 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/64440] -Wdiv-by-zero false negative on const variables Date: Tue, 06 Jan 2015 15:23: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-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00313.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64440 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #4 from Marek Polacek --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #3) > (In reply to Chengnian Sun from comment #2) > > Thanks for your reply. It seems GCC sometimes does consider "const int"= for > > other types of warnings (but not for -Wdiv-by-zero). See the following,= with > > -O3, GCC warns that the left shift count is negative.=20=20 > >=20 >=20 > I wonder how this happens? The warning is still given by the FE! By using decl_constant_value_for_optimization. >>From gcc-bugs-return-472320-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jan 06 15:38:56 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 24635 invoked by alias); 6 Jan 2015 15:38:55 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 24606 invoked by uid 48); 6 Jan 2015 15:38:50 -0000 From: "maurits.de.jong at ericsson dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/64509] _Generic throws error in unselected generic association Date: Tue, 06 Jan 2015 15:38: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-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: maurits.de.jong at ericsson dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00314.txt.bz2 Content-length: 338 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64509 --- Comment #2 from Martien de Jong --- That's just rephrasing my bugreport. The question is, should it type check while parsing an expression that may not be realized? The entire idea of switching on a type is to prevent and fix type errors, no?