This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add macro DISABLE_COPY_AND_ASSIGN
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Jul 2017 08:55:10 +0000
- Subject: Re: [PATCH] Add macro DISABLE_COPY_AND_ASSIGN
- Authentication-results: sourceware.org; auth=none
- References: <1500456645-30359-1-git-send-email-yao.qi@linaro.org>
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 <yao.qi@linaro.org>
> Pedro Alves <palves@redhat.com>
>
> * ansidecl.h (DISABLE_COPY_AND_ASSIGN): New macro.
>
> gcc/cp:
>
> 2017-07-19 Yao Qi <yao.qi@linaro.org>
>
> * cp-tree.h (class ovl_iterator): Use DISABLE_COPY_AND_ASSIGN.
> * name-lookup.c (struct name_loopup): Likewise.
>
> gcc:
>
> 2017-07-19 Yao Qi <yao.qi@linaro.org>
>
> * 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
--
Yao (齐尧)