PR c++/58407 - deprecated implicit copy ops.
commit17847cffc7465c3120c33c0119a00a012b93ec2b
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 May 2018 20:02:48 +0000 (18 20:02 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 May 2018 20:02:48 +0000 (18 20:02 +0000)
tree5684d331d1a9d9e995bb252f9febf8e86618a0a5
parent66d1168c6341cefd12f8b3bddafd0287537e7e3d
PR c++/58407 - deprecated implicit copy ops.

gcc/c-family/
* c.opt (Wdeprecated-copy): New flag.
gcc/cp/
* call.c (build_over_call): Warn about deprecated trivial fns.
* class.c (classtype_has_user_copy_or_dtor): New.
(type_build_ctor_call): Check TREE_DEPRECATED.
(type_build_dtor_call): Likewise.
* decl2.c (cp_warn_deprecated_use): Move from tree.c.
Add checks.  Return bool.  Handle -Wdeprecated-copy.
(mark_used): Use it.
* decl.c (grokdeclarator): Remove redundant checks.
* typeck2.c (build_functional_cast): Likewise.
* method.c (lazily_declare_fn): Mark deprecated copy ops.
* init.c (build_aggr_init): Only set TREE_USED if there are
side-effects.
libitm/
* beginend.cc (save): Disable -Werror=deprecated-copy.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260381 138bc75d-0d04-0410-961f-82ee72b054a4
17 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/init.c
gcc/cp/method.c
gcc/cp/tree.c
gcc/cp/typeck2.c
gcc/doc/invoke.texi
gcc/testsuite/g++.dg/cpp0x/depr-copy1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/warn6.C
libitm/ChangeLog
libitm/beginend.cc