From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5278 invoked by alias); 18 Feb 2015 16:25:47 -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 5227 invoked by uid 48); 18 Feb 2015 16:25:44 -0000 From: "ams at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/64491] [5 Regression] incorrect warning: loop exit may only be reached after undefined behavior Date: Wed, 18 Feb 2015 16:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: ams at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 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-02/txt/msg02024.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64491 --- Comment #8 from Andrew Stubbs --- Just silencing the warning may not be enough. The compiler may optimize away loop exit conditions based on this analysis. The warning mirrors the logic rather than shares it (due to the way the logic is distributed) so this may not actually be a problem, in this case, but I'd have to look closer.