From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25122 invoked by alias); 10 Jan 2012 10:04:19 -0000 Received: (qmail 25103 invoked by uid 22791); 10 Jan 2012 10:04:18 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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; Tue, 10 Jan 2012 10:04:06 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/51806] -flto ignores -Werror Date: Tue, 10 Jan 2012 10:04:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed CC AssignedTo Ever Confirmed 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-01/txt/msg00987.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51806 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2012-01-10 CC| |jsm28 at gcc dot gnu.org AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #1 from Richard Guenther 2012-01-10 10:03:17 UTC --- Confirmed. It seems that -Werror is a C-family frontend specific option, despite being annotated as 'common'. Only c_common_handle_option has case OPT_Werror: global_dc->warning_as_error_requested = value; break; and thus properly adjusts the diagnostic machinery of the middle-end. But -Werror=... seems to be handled fine (thus, in your case -Werror=uninitialized). That seems inconsistent at least. It looks like the OPT_Werror handling above should move to common_handle_option instead. Joseph?