From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 1DF733852C4D for ; Wed, 23 Nov 2022 15:33:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1DF733852C4D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669217623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vq2SrOiLpPTNAFyMdcNmfnvSeY9FchYo9DFIBCN2Xh0=; b=DWP/Pbiwppzxry3Hc8NjshLv5GLbpAIbDPpVvPrFLIhnsONyd7v04mTlLpuKd0/bEhxVnU L9j1B+JzOyHwaApfisAQuoFgnvIXZJn5HwbR7kxGOX6onJ0VpjdAqSHsgaNLDNnoEXYXqt mn+jh8oWN6RHwGtzEYH0foTLqLoubsI= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-550-FWRNstrYNTiVj5jr3TokFw-1; Wed, 23 Nov 2022 10:33:42 -0500 X-MC-Unique: FWRNstrYNTiVj5jr3TokFw-1 Received: by mail-qk1-f200.google.com with SMTP id bk30-20020a05620a1a1e00b006fb2378c857so22846294qkb.18 for ; Wed, 23 Nov 2022 07:33:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vq2SrOiLpPTNAFyMdcNmfnvSeY9FchYo9DFIBCN2Xh0=; b=ON/uALJG0AqE98RjFAHGlKXmOf7ykM5N11K9CEc93t1hLec6QsYsKvunCste0F2RWG 54qslttlMW6QzRvAbOFEI0AanJc9V8Ir4pBcUaKfxcg+SgeJKBBgiqYmKGQYNF0I7hUJ /A9r88rbRRoHOaNv4RkYyPiRUFEtw/grVprtypPH70y2QX1VAQshLxhKbAd8Lb7XEwpr LvqPJGRYFz5T2LKNEsFjQN/FhVfoZF1QdQQiSt4tFgkcaxg1RsyPhtNq2axOmnbgOO/H nlOrOSB7mMJY4uzNsqtLmk03T3Hye6dQDUom8bTEqJQRGT0aBvR6Va5KXHxIwAffISz8 +dTA== X-Gm-Message-State: ANoB5pmO/8jie3v3l1hspqhEud4+67ZopneWfCT9vnVBItnSN0pWkq7O G1pFwxSwmpph+cHcQSsbPKlmOS8mEsHFY6ai/gvAu12UTI8/jqlJLJ8jxVFg5LE7zpY1+AyR+tg R3VEipq0xDO/pBUONbw== X-Received: by 2002:a0c:ea41:0:b0:4bb:65bd:d6cc with SMTP id u1-20020a0cea41000000b004bb65bdd6ccmr8215869qvp.113.1669217622010; Wed, 23 Nov 2022 07:33:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf5NKYasMkyyjjNyA3N5A7JfELTm0/nKlNiDAhjS8SQotdhhUtoVhC+UxfWiXXrsxTk2R1H/fQ== X-Received: by 2002:a0c:ea41:0:b0:4bb:65bd:d6cc with SMTP id u1-20020a0cea41000000b004bb65bdd6ccmr8215852qvp.113.1669217621719; Wed, 23 Nov 2022 07:33:41 -0800 (PST) Received: from [192.168.1.137] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id bl3-20020a05620a1a8300b006fae7e6204bsm12488263qkb.108.2022.11.23.07.33.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Nov 2022 07:33:41 -0800 (PST) Message-ID: Date: Wed, 23 Nov 2022 10:33:40 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] doc: -Wdelete-non-virtual-dtor supersedes -Wnon-virtual-dtor To: Jonathan Wakely , gcc-patches@gcc.gnu.org References: <20221123101038.2192550-1-jwakely@redhat.com> From: Jason Merrill In-Reply-To: <20221123101038.2192550-1-jwakely@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 List-Id: On 11/23/22 05:10, Jonathan Wakely wrote: > The existence of this option makes users think they need it (even though > it's in neither -Wall nor -Wextra). Document that there's a better > option (since 2011). > > OK for trunk? OK. > -- >8 -- > > The newer -Wdelete-non-virtual-dtor has no false positives and fewer > bugs. There is very little reason to use -Wnon-virtual-dtor instead. > > gcc/ChangeLog: > > * doc/invoke.texi (C++ Dialect Options): Recommend using > -Wdelete-non-virtual-dtor instead of -Wnon-virtual-dtor. > --- > gcc/doc/invoke.texi | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index 330da6eb5d4..4899bd1ea4c 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -3986,6 +3986,9 @@ destructor itself or in an accessible polymorphic base class, in which > case it is possible but unsafe to delete an instance of a derived > class through a pointer to the class itself or base class. This > warning is automatically enabled if @option{-Weffc++} is specified. > +The @option{-Wdelete-non-virtual-dtor} option (enabled by @option{-Wall}) > +should be preferred because it warns about the unsafe cases without false > +positives. > > @item -Wregister @r{(C++ and Objective-C++ only)} > @opindex Wregister