From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39704 invoked by alias); 12 Mar 2015 14:36:38 -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 39463 invoked by uid 48); 12 Mar 2015 14:36:33 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/65403] New: -Wno-error= is an error Date: Thu, 12 Mar 2015 14:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter Message-ID: 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-03/txt/msg01320.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65403 Bug ID: 65403 Summary: -Wno-error= is an error Product: gcc Version: 5.0 Status: UNCONFIRMED Keywords: diagnostic Severity: enhancement Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org If you want to silence warnings you can use -Wno-XXX without caring about whether a compiler implements -WXXX already. This doesn't seem to work with -Wno-error=XXX which errors on unknown XXX. It seems to me that we should treat -W[no-]error=XXX the same as -Wno-XXX for unknown XXX as it certainly will enable/disable errors for the warning XXX both if present or not present (no warnings anyway). > gcc-5 -Wall -Werror -Wno-error=logical-not-parentheses -S t.c > gcc-4.8 -Wall -Werror -Wno-error=logical-not-parentheses -S t.c cc1: error: -Werror=logical-not-parentheses: no option -Wlogical-not-parentheses > gcc-5 -Wno-error=foo -S t.c cc1: error: -Werror=foo: no option -Wfoo