From patchwork Fri Feb 17 23:05:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 58794 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp111931wrn; Fri, 17 Feb 2023 15:06:29 -0800 (PST) X-Google-Smtp-Source: AK7set+iCUwsUFAuE+gwUhI3WdGTj18BRtC9jLhVCQEUtOpVL3MIv1tf9Rp18G2RUCDjiOGkYQQH X-Received: by 2002:a17:906:5587:b0:8ae:707:e129 with SMTP id y7-20020a170906558700b008ae0707e129mr2824798ejp.19.1676675189413; Fri, 17 Feb 2023 15:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676675189; cv=none; d=google.com; s=arc-20160816; b=N61vgipdZ8Iuv+FWDQXci+SF0jdYwjyHZBn5kRJYb4wqHazUAQNI5pDYrBBoewp3PH x7du5FMRLUNN3Iwj1PEQjsoq+bZEHdKw82+I/c2tpp3buezAKk2j6q8vvomlcNTtUkeI 7k9jbJjipyJr10v8ncCofk6GARCjYnmhVk6oDlAREOdmmuTCli4KtETtDMWwYO1P8XEp B2NUM3NJGpsK2ggd9RvdfUlDdFRdipRphEEz9qxeLIPKqEumiPBIWbJMftrHZyujf7KM LqYX5Q7P8l7dzSwG680VBO8GMGoWN7S9QB48in00RKmnlqFPV6QVqIZiVmW66QRYo0id hbMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=6Rkx6feLE8ltE5ewgKvGhaulRk6fjtbP7/cF3+t+s3M=; b=htI38wc5c9rW4p8pvpUxWvr34AB1ekEyMwNOurazTuGdLfxK8XDNDiZlb7KbBxow0J pfp5PG4DrhrLxQXCSQollF6jHYE6w0zwGOxJRc4BksW9LGWSvPezL8OmaiHqnCVj+/+O 4VFI5t3ZWNy0QFZqvwds4xShJ4IwLhfhdtL8FRvfrJ7EFhxNy6M0Az23nDquVmTsnNMt 0W97qS1DVWAmE91f8SxrnmQC3lNJU9R+IJOrNcAXCRP6ydo/04XNx9/p9nYPM5N5vE0C lqdc9+TMvroOxvI7nRFrFdyD/PXhVKVd05eDOhYaqBZbeGyIkXxrmNnn6P3OJg5jArVK aAGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Q8RXhhER; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id j25-20020a170906105900b008b1499da921si7535751ejj.245.2023.02.17.15.06.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 15:06:29 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Q8RXhhER; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5DB77385B523 for ; Fri, 17 Feb 2023 23:06:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DB77385B523 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676675188; bh=6Rkx6feLE8ltE5ewgKvGhaulRk6fjtbP7/cF3+t+s3M=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Q8RXhhERzAjb4G16AcTa9n2GsjGke2Zdfb1esihu2WwYWlK/egtV+yWG11yIoUFC5 ezu4blje2Ccg5ntIgNPwDNI5/3VfoPTbmYZkSyn4MGUGxtv3dp0jMG7BQtPgWNqC0s C+jvRgdVnECNA7GiV+ca+b6Un5UtIGFJH3ioxqJ8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 6A0FE385842D for ; Fri, 17 Feb 2023 23:05:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A0FE385842D Received: by mail-wm1-x32d.google.com with SMTP id 4-20020a05600c22c400b003dc4fd6e61dso2133492wmg.5 for ; Fri, 17 Feb 2023 15:05:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6Rkx6feLE8ltE5ewgKvGhaulRk6fjtbP7/cF3+t+s3M=; b=xRSRsYfH34QR2g+faixGOV/SX+Ulde/RF8KeqtqUyJs9nyi66sPxSsUf2kiRWXA69h 6VW81l8+kl749FLBbOFKvjGwa5apVZSaNY1bYKa/cAE7YaveLS5Muwnp3R566qFDJ0Y7 r+G9Wm7ByRFiuApd5fJiaD/Do2UHRYAu8LyzCxgkvNIYKfaT5sgJ9gQsUyNlXTnX3uwd i1+qgq2OoBpauKBEl7OJlEQTTKiwBSj3DxoQ1fm5NR+J56JIgSMNPVGTvToBYExJfODd GyzMdicZmXhGiP/wfviOwtcYFQS0lpgiAiSB46l0jtIW6A6tIfjIQr4IEENYsUPClbK/ 6d1g== X-Gm-Message-State: AO0yUKWaqOODWesp2z89dc9ZxKda3sV1msy0snCd6L8GKRhYY70kf7N7 An+yFG5V7b+OGiHXwZqRS6YUraTm7GE= X-Received: by 2002:a05:600c:1613:b0:3dd:af7a:53ed with SMTP id m19-20020a05600c161300b003ddaf7a53edmr902009wmn.11.1676675141877; Fri, 17 Feb 2023 15:05:41 -0800 (PST) Received: from asus5775.alejandro-colomar.es ([170.253.36.171]) by smtp.googlemail.com with ESMTPSA id bh13-20020a05600c3d0d00b003e00c453447sm2511567wmb.48.2023.02.17.15.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 15:05:41 -0800 (PST) X-Google-Original-From: Alejandro Colomar To: gcc-patches@gcc.gnu.org Cc: Alejandro Colomar , Andreas Schwab , David Malcolm , Florian Weimer , Iker Pedrosa , Jens Gustedt , Jonathan Wakely , Mark Wielaard , Martin Uecker , Michael Kerrisk , Paul Eggert , Sam James , Siddhesh Poyarekar , Yann Droneaud Subject: [PATCH resend] Make -Wuse-after-free=3 the default one in -Wall Date: Sat, 18 Feb 2023 00:05:26 +0100 Message-Id: <20230217230525.10750-1-alx@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <3d7d07cf-3276-b091-69d5-bf00b04e518d@gotplt.org> References: <3d7d07cf-3276-b091-69d5-bf00b04e518d@gotplt.org> MIME-Version: 1.0 X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: , X-Patchwork-Original-From: Alejandro Colomar via Gcc-patches From: Alejandro Colomar Reply-To: Alejandro Colomar Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758114987431472267?= X-GMAIL-MSGID: =?utf-8?q?1758121363447500875?= Link: Link: Cc: Andreas Schwab Cc: David Malcolm Cc: Florian Weimer Cc: Iker Pedrosa Cc: Jens Gustedt Cc: Jonathan Wakely Cc: Mark Wielaard Cc: Martin Uecker Cc: Michael Kerrisk Cc: Paul Eggert Cc: Sam James Cc: Siddhesh Poyarekar Cc: Yann Droneaud Signed-off-by: Alejandro Colomar --- This is a resend of the same patch previously sent to gcc@. gcc/c-family/c.opt | 4 ++-- gcc/doc/invoke.texi | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index c0fea56a8f5..1a3fc2c5d74 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1411,11 +1411,11 @@ C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_unused_const_variable) Warn when a const variable is unused. ; 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 +; in order for the default -Wall setting of -Wuse-after-free=3 to take ; effect. Wuse-after-free= -LangEnabledBy(C ObjC C++ LTO ObjC++, Wall,2,0) +LangEnabledBy(C ObjC C++ LTO ObjC++, Wall,3,0) ; in common.opt Wvariadic-macros diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 7b308cd3c31..d910052ce0c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -4720,7 +4720,7 @@ instead of pointers. This approach obviates needing to adjust the stored pointers after reallocation. @end table -@option{-Wuse-after-free=2} is included in @option{-Wall}. +@option{-Wuse-after-free=3} is included in @option{-Wall}. @item -Wuseless-cast @r{(C++ and Objective-C++ only)} @opindex Wuseless-cast