From patchwork Tue Mar 29 09:24:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1610562 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KSPKd1gN8z9sGB for ; Tue, 29 Mar 2022 20:24:53 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F03C3888C7F for ; Tue, 29 Mar 2022 09:24:50 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id D1D113888825 for ; Tue, 29 Mar 2022 09:24:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D1D113888825 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="73773940" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 29 Mar 2022 01:24:16 -0800 IronPort-SDR: kgHUJQ26STlSwt0hsD5F3uVKG2bOEHZeMGVOIyNulhkRJ8yd1tDFQsytbRDv1DTdyyNYBCnDUp rTcjrGSNpqyzdQzjA7kDMnNwW390VSaue+b2FsqQZ5WcmH0L3wz4Qvn0jRa+D6o6mXYPLdNAxD T5iqWScN2h8P09Fype/BIJIDGegIALk0WkMgINK99kucr01OYK2YIcx4r6gh3qxO7atKLSK8jv /BL2KcPSQaK2abi/bWcKHYfAp+jET0g8AkbK96h+SM8H/PHBPdm9aRWU9RiqufCfYHi/t8ESQ4 6Mc= From: Thomas Schwinge To: Martin Sebor , , Joseph Myers Subject: options: Remove 'gcc/c-family/c.opt:Wuse-after-free' option definition record (was: [PATCH v2 1/2] add -Wuse-after-free) In-Reply-To: <67e378bc-fc09-1c79-a0ac-8a54c6f5d062@gmail.com> References: <2f6ecb46-954a-4eb2-c10c-2b2617ff382f@gmail.com> <13a79548-162e-e499-559e-c29a77b1d188@gmail.com> <9aa3967f-bdb2-f4b4-eb6c-3ceaa93ee0db@redhat.com> <67e378bc-fc09-1c79-a0ac-8a54c6f5d062@gmail.com> 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:24:04 +0200 Message-ID: <87ee2l9knf.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi! On 2022-01-15T17:00:11-0700, Martin Sebor via Gcc-patches wrote: > On 1/11/22 15:40, Jason Merrill wrote: >> On 11/30/21 17:32, Martin Sebor via Gcc-patches wrote: >>> [default setting of the option] >> Let's put =2 in -Wall for now. > I've adjusted [...] and pushed r12-6605 [...] That's from commit 671a283636de75f7ed638ee6b01ed2d44361b8b6 "Add -Wuse-after-free [PR80532]": | --- gcc/common.opt | +++ gcc/common.opt | [...] | +Wuse-after-free | +Common Var(warn_use_after_free) Warning | +Warn for uses of pointers to deallocated strorage. | + | +Wuse-after-free= | +Common Joined RejectNegative UInteger Var(warn_use_after_free) Warning IntegerRange(0, 3) | +Warn for uses of pointers to deallocated strorage. | [...] | --- gcc/c-family/c.opt | +++ gcc/c-family/c.opt | [...] | +# Defining these options here in addition to common.opt is necessary | +# in order for the default -Wall setting of -Wuse-after-free=2 to take | +# effect. | + | +Wuse-after-free | +LangEnabledBy(C ObjC C++ LTO ObjC++) | +; in common.opt | + | +Wuse-after-free= | +LangEnabledBy(C ObjC C++ LTO ObjC++, Wall,2,0) | +; in common.opt | [...] OK to push the attached "options: Remove 'gcc/c-family/c.opt:Wuse-after-free' option definition record"? 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 eda478e23a611611353d22e11727a797b9f321f9 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sat, 26 Mar 2022 22:07:54 +0100 Subject: [PATCH] options: Remove 'gcc/c-family/c.opt:Wuse-after-free' option definition record A one-argument form of the 'LangEnabledBy' option property isn't defined, and effectively appears to be a no-op. Removing that one, the 'gcc/c-family/c.opt:Wuse-after-free' option definition record becomes empty, and doesn't add anything over 'gcc/common.opt:Wuse-after-free', and may thus be removed entirely. This only changes 'build-gcc/gcc/optionlist' accordingly, but no other generated files. Clean-up after recent commit 671a283636de75f7ed638ee6b01ed2d44361b8b6 "Add -Wuse-after-free [PR80532]". gcc/c-family/ * c.opt (Wuse-after-free): Remove. --- gcc/c-family/c.opt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 3c2ec7744b0..1034a1b3946 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1373,14 +1373,10 @@ Wunused-const-variable= C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_unused_const_variable) Warning LangEnabledBy(C ObjC,Wunused-variable, 1, 0) IntegerRange(0, 2) Warn when a const variable is unused. -; Defining these options here in addition to common.opt is necessary +; Defining this option here in addition to common.opt is necessary ; in order for the default -Wall setting of -Wuse-after-free=2 to take ; effect. -Wuse-after-free -LangEnabledBy(C ObjC C++ LTO ObjC++) -; in common.opt - Wuse-after-free= LangEnabledBy(C ObjC C++ LTO ObjC++, Wall,2,0) ; in common.opt -- 2.25.1