This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add macro DISABLE_COPY_AND_ASSIGN


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 (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]