From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102536 invoked by alias); 8 Dec 2018 16:58:25 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 102525 invoked by uid 89); 8 Dec 2018 16:58:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1088, held X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Dec 2018 16:58:23 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 91F3630832D1; Sat, 8 Dec 2018 16:58:22 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-214.ams2.redhat.com [10.36.117.214]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B83F600C2; Sat, 8 Dec 2018 16:58:21 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id wB8GwJKC020744; Sat, 8 Dec 2018 17:58:20 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id wB8GwH2v020743; Sat, 8 Dec 2018 17:58:17 +0100 Date: Sat, 08 Dec 2018 16:58:00 -0000 From: Jakub Jelinek To: Ville Voutilainen Cc: Jason Merrill , gcc-patches List Subject: Re: C++ PATCH for c++/88136, -Wdeprecated-copy too noisy Message-ID: <20181208165817.GU12380@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00517.txt.bz2 On Sat, Dec 08, 2018 at 06:46:27PM +0200, Ville Voutilainen wrote: > On Thu, 6 Dec 2018 at 23:12, Jason Merrill wrote: > > > > -Wdeprecated-copy does find some real bugs, but it also complains > > about a lot of reasonable code for which the implicitly declared copy > > ctor/op= are fine oven though the class has a user-defined destructor: > > this situation is only problematic if the destructor releases > > resources held in one of the non-static data members. > > > > So, this patch reins it in somewhat: first by moving from -Wall to > > -Wextra, and then also only complaining if the other copy op is > > user-declared. The old behavior can be explicitly requested with > > -Wdeprecated-copy-dtor. > > Hmm. > > g++ -c -pipe -O2 -fPIC -std=c++1z -fvisibility=hidden > -fvisibility-inlines-hidden -ffunction-sections -fdata-sections > -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -W is an alias to -Wextra. > That doesn't have -Wextra. Yet the -Wdeprecated-copy still triggers. Jakub