From patchwork Sat Mar 26 20:35:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 52387 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 DE9D6385EC09 for ; Sat, 26 Mar 2022 20:36:10 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 313C23858D28 for ; Sat, 26 Mar 2022 20:35:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 313C23858D28 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,213,1643702400"; d="scan'208,223";a="73475594" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 26 Mar 2022 12:35:52 -0800 IronPort-SDR: IT0uS6LYfSiQ91tm6JncJpXhMouODZnmSzvP7YpMhZmGOj1FVwOiTv8uqIO4EhwX/bwJszLJmp voGu5LFHuOzWMXo3yhJHZuQeC/fihotDS2++Wg5ib5VCFYrIetqxSv+6SIf8SrPehPDPnGOyuF lGlNl9MjBGjyn49GnejJr3fpf8Uyo31WzzXbQDyzJlwFeEjsvwN5N4w/5Eho280M0Z1FXIVcFN dFa4AIz2tcYepfVvtACihG4jXkJK4i/GMhaEqMwb4WbqhXHte1eg06IZdRRC7rmKZ5Na8sZCvr 1Zk= From: Thomas Schwinge To: Martin Sebor , Subject: Remove mysterious '-# Defining these options here in addition to common.opt is necessary' command-line option (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.1+93~g67ed7df (https://notmuchmail.org) Emacs/27.1 (i686-pc-linux-gnu) Date: Sat, 26 Mar 2022 21:35:42 +0100 Message-ID: <87mthcv4dd.fsf@dirichlet.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) 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 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 [...] Pushed to master branch commit 43911ddd18b97d8ebd17d2959f36efa539d359b7 "Remove mysterious '-# Defining these options here in addition to common.opt is necessary' command-line option", see attached. ;'-) 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 43911ddd18b97d8ebd17d2959f36efa539d359b7 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 24 Mar 2022 22:34:30 +0100 Subject: [PATCH] Remove mysterious '-# Defining these options here in addition to common.opt is necessary' command-line option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: $ [...]/gcc '-# Defining these options here in addition to common.opt is necessary' -S -x c /dev/null && echo MYSTERIOUS MYSTERIOUS After: $ [...]/gcc '-# Defining these options here in addition to common.opt is necessary' -S -x c /dev/null && echo MYSTERIOUS gcc: error: unrecognized command-line option ‘-# Defining these options here in addition to common.opt is necessary’ This commit changes: --- [...]/build-gcc/gcc/optionlist 2022-03-24 22:12:07.936746648 +0100 +++ [...]/build-gcc/gcc/optionlist 2022-03-24 22:30:06.976737341 +0100 @@ -1,4 +1,3 @@ -# 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. ###Driver -all-warningsAda AdaWhy AdaSCIL Alias(Wall) -all-warningsC ObjC C++ ObjC++ Warning Alias(Wall) [...] --- [...]/build-gcc/gcc/options.cc 2022-03-24 22:12:09.548727738 +0100 +++ [...]/build-gcc/gcc/options.cc 2022-03-24 22:30:08.904727249 +0100 @@ -3222,15 +3222,6 @@ const struct cl_option cl_options[] = { /* [0] = */ { - "-# Defining these options here in addition to common.opt is necessary", - "# effect.", - NULL, - NULL, - NULL, NULL, N_OPTS, N_OPTS, 68, /* .neg_idx = */ -1, - 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - (unsigned short) -1, 0, CLVC_INTEGER, 0, -1, -1 }, - /* [1] = */ { "-###", NULL, NULL, [...] ..., and re-numbers all following options. --- [...]/build-gcc/gcc/options.h 2022-03-21 23:24:25.894226828 +0100 +++ [...]/build-gcc/gcc/options.h 2022-03-24 22:30:07.288735708 +0100 @@ -9753,2118 +9753,2117 @@ enum opt_code { - OPT___Defining_these_options_here_in_addition_to_common_opt_is_necessary = 0,/* -# Defining these options here in addition to common.opt is necessary */ [...] ..., and likewise re-numbers all following options. Clean-up for commit 671a283636de75f7ed638ee6b01ed2d44361b8b6 "Add -Wuse-after-free [PR80532]". gcc/c-family/ * c.opt: Properly quote comment. --- gcc/c-family/c.opt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 9a4828ebe37..790d47caf0a 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1377,9 +1377,9 @@ 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 -# in order for the default -Wall setting of -Wuse-after-free=2 to take -# effect. +; 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++) -- 2.35.1