From patchwork Tue Mar 29 09:27:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 52441 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5C7893889813 for ; Tue, 29 Mar 2022 09:27:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id AECAD3858C50 for ; Tue, 29 Mar 2022 09:27:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AECAD3858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.90,219,1643702400"; d="scan'208,223";a="76331149" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 29 Mar 2022 01:27:33 -0800 IronPort-SDR: /HjzTUreE2RRbEbq2t3+hT0UZyMhg1I8OW9gGHLyJz+9ZIFPCbukrQLdSbuj5mQxVBDZ2Jn9EO Yghx1yd8qasFvs5kuW8Nzsn502bKz7utXdvzrrMVh7keMbQxd4p98PbxNOncaXvtRKND+qlJFb cAgL+c+1MHAWVwXiY2oRfU/ruf0hMhnlPRJszGqI6e8Rz9+JTSOA9CgZZjhFRBHz45yp5kLS3T PpeUu5IppJWYO4EcWMDT7FiOc01mDjFG1SfYFmHw+Bpd7VUypM0EMi+fuUx9MuMZGX/NNJd3kW lUE= From: Thomas Schwinge To: Marek Polacek , Jonathan Wakely , , Joseph Myers Subject: options, '-Wc++[...]-extensions': Remove undefined one-argument 'LangEnabledBy' option properties (was: [PATCH] c++: Add new warning options for C++ language mismatches) In-Reply-To: References: User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Tue, 29 Mar 2022 11:27:25 +0200 Message-ID: <87czi59khu.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi! On 2021-05-19T13:09:29-0400, Marek Polacek via Gcc-patches wrote: > On Wed, May 19, 2021 at 05:59:34PM +0100, Jonathan Wakely wrote: >> On 19/05/21 12:53 -0400, Marek Polacek wrote: >> > On Wed, May 19, 2021 at 05:39:24PM +0100, Jonathan Wakely via Gcc-patches wrote: >> > > --- a/gcc/c-family/c.opt >> > > +++ b/gcc/c-family/c.opt >> > > +Wc++11-extensions >> > > +C++ ObjC++ Var(warn_cxx11_extensions) Warning LangEnabledBy(C++ ObjC++,Wall) Init(1) >> > > +Warn about C++11 constructs in code compiled with an older standard. >> > > + >> > > +[Etc.] >> > So these are enabled by -Wall but also turned on by default? Let's choose one >> > and then drop either the Init(1) or the LangEnabledBy(C++ ObjC++,Wall) part? >> >> Ah, good point. I mostly just cargo-cult what I see in that file (is >> the format documented somewhere?) > > doc/options.texi I think. Correct. >> I think to preserve the current behaviour (using these constructs in >> an unsupported dialect warns by default) we want them to be Init(1) >> but not in -Wall. [...] What you pushed in commit ee336ecb2a7161bc28f6c5343d97870a8d15e177 "c++: Add new warning options for C++ language mismatches" then had the new options defined as follows; specifying 'LangEnabledBy(C++ ObjC++)' instead of originally-posted 'LangEnabledBy(C++ ObjC++,Wall)': | --- gcc/c-family/c.opt | +++ gcc/c-family/c.opt | [...] | +Wc++11-extensions | +C++ ObjC++ Var(warn_cxx11_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1) | +Warn about C++11 constructs in code compiled with an older standard. | + | +[Etc.] OK to push the attached "options, '-Wc++[...]-extensions': Remove undefined one-argument 'LangEnabledBy' option properties"? Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 78ee403f982526e0c026719c450dc5aead84accf Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sat, 26 Mar 2022 22:21:14 +0100 Subject: [PATCH] options, '-Wc++[...]-extensions': Remove undefined one-argument 'LangEnabledBy' option properties A one-argument form of the 'LangEnabledBy' option property isn't defined, and effectively appears to be a no-op. Removing these only changes 'build-gcc/gcc/optionlist' accordingly, but no other generated files. Clean-up for commit ee336ecb2a7161bc28f6c5343d97870a8d15e177 "c++: Add new warning options for C++ language mismatches". gcc/c-family/ * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions) (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy' option properties. --- gcc/c-family/c.opt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 1034a1b3946..07da40ef43b 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -459,23 +459,23 @@ C++ ObjC++ Var(warn_cxx20_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Warn about C++ constructs whose meaning differs between ISO C++ 2017 and ISO C++ 2020. Wc++11-extensions -C++ ObjC++ Var(warn_cxx11_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1) +C++ ObjC++ Var(warn_cxx11_extensions) Warning Init(1) Warn about C++11 constructs in code compiled with an older standard. Wc++14-extensions -C++ ObjC++ Var(warn_cxx14_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1) +C++ ObjC++ Var(warn_cxx14_extensions) Warning Init(1) Warn about C++14 constructs in code compiled with an older standard. Wc++17-extensions -C++ ObjC++ Var(warn_cxx17_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1) +C++ ObjC++ Var(warn_cxx17_extensions) Warning Init(1) Warn about C++17 constructs in code compiled with an older standard. Wc++20-extensions -C++ ObjC++ Var(warn_cxx20_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1) +C++ ObjC++ Var(warn_cxx20_extensions) Warning Init(1) Warn about C++20 constructs in code compiled with an older standard. Wc++23-extensions -C++ ObjC++ Var(warn_cxx23_extensions) Warning LangEnabledBy(C++ ObjC++) Init(1) +C++ ObjC++ Var(warn_cxx23_extensions) Warning Init(1) Warn about C++23 constructs in code compiled with an older standard. Wcast-function-type -- 2.25.1