From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41465 invoked by alias); 11 Aug 2017 14:14:50 -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 40724 invoked by uid 89); 11 Aug 2017 14:14:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=fallen, controversial, reinvent, diffusion X-HELO: mail-wr0-f179.google.com Received: from mail-wr0-f179.google.com (HELO mail-wr0-f179.google.com) (209.85.128.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Aug 2017 14:14:47 +0000 Received: by mail-wr0-f179.google.com with SMTP id f21so13812205wrf.5 for ; Fri, 11 Aug 2017 07:14:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=EicvNj+lQ9moSntR6p3rRacNPh9D4pMf70w/oQGJb/8=; b=XlUF29BJmKXCvsnS3xIGLRZEVe/59jMTFw2i5RduI17btTSdGCgGv8MH/BH/zFw0ZR e3PgcOl7fV2D5eSR0g8fc2ZwoSUfVECvRE2oJMSGpAmFFkjm8o1JB4gV9DbR/106odEf pTVtri/x1iZ0ZXo+wLyeCATwb+E3sA4ACuu6oNJrAZjI80tbCjC5w4JIgbfYZ4Ql0tTV K1p+gi8mBSPwNFIEOL8w5SHKVqRjvS5MKPyBMXMq5jCxBIxNeOxg8fs1r8bTKHyh/dGj +vW2pGE2pEEznzaW90iqqVSrs3usuKTjWxESrL0ZvByoW3eyRV5xDPBW+Ey0wHIvs/Bm NFCg== X-Gm-Message-State: AHYfb5gHdLvUZkiH978OiRCsajDpSh0gC+imM8MdnOEF/eYqvZ0jm/23 KJ1xTQ+TIbA8gtaG X-Received: by 10.223.131.99 with SMTP id 90mr10260867wrd.155.1502460885703; Fri, 11 Aug 2017 07:14:45 -0700 (PDT) Received: from [192.168.0.101] (bl17-148-124.dsl.telepac.pt. [188.82.148.124]) by smtp.gmail.com with ESMTPSA id b70sm1098445wmd.25.2017.08.11.07.14.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Aug 2017 07:14:44 -0700 (PDT) Subject: Re: [PATCH] Add macro DISABLE_COPY_AND_ASSIGN To: Yao Qi , gcc-patches , Ian Lance Taylor References: <1500456645-30359-1-git-send-email-yao.qi@linaro.org> <20170726085510.GA8039@1170ee0b50d5> From: Pedro Alves Message-ID: Date: Fri, 11 Aug 2017 15:38:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-08/txt/msg00795.txt.bz2 On 08/02/2017 12:19 PM, Yao Qi wrote: > On Wed, Jul 26, 2017 at 9:55 AM, Yao Qi wrote: >> On 17-07-19 10:30:45, Yao Qi wrote: >>> We have many classes that copy cotr and assignment operator are deleted >>> in different projects, gcc, gdb and gold. So this patch adds a macro >>> to do this, and replace these existing mechanical code with macro >>> DISABLE_COPY_AND_ASSIGN. >>> >>> The patch was posted in gdb-patches, >>> https://sourceware.org/ml/gdb-patches/2017-07/msg00254.html but we >>> think it is better to put this macro in include/ansidecl.h so that >>> other projects can use it too. >>> >>> Boostrapped on x86_64-linux-gnu. Is it OK? >>> >>> include: >>> >>> 2017-07-19 Yao Qi >>> Pedro Alves >>> >>> * ansidecl.h (DISABLE_COPY_AND_ASSIGN): New macro. >>> >>> gcc/cp: >>> >>> 2017-07-19 Yao Qi >>> >>> * cp-tree.h (class ovl_iterator): Use DISABLE_COPY_AND_ASSIGN. >>> * name-lookup.c (struct name_loopup): Likewise. >>> >>> gcc: >>> >>> 2017-07-19 Yao Qi >>> >>> * tree-ssa-scopedtables.h (class avail_exprs_stack): Use >>> DISABLE_COPY_AND_ASSIGN. >>> (class const_and_copies): Likewise. >> >> Ping. >> https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01134.html >> > > Ping. It is a quite straightforward patch, can any one > take a look? > Yeah, this is a macro that lots of projects out there reinvent, can't imagine it being very controversial. I could have used this today in another spot in gdb. The patch as is touches areas with different maintainers, it may have fallen victim of diffusion of responsibility. Could we get at least the ansidecl.h change in, so we can start using it in gdb? CCing Ian as a libiberty maintainer. Thanks, Pedro Alves