[Bug c++/88136] -Wdeprecated-copy is draconian and shouldn't be in -Wall
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Mar 9 05:34:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88136
--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #4)
> Author: jason
> Date: Thu Dec 6 21:17:08 2018
> New Revision: 266867
>
> URL: https://gcc.gnu.org/viewcvs?rev=266867&root=gcc&view=rev
> Log:
> PR c++/88136 - -Wdeprecated-copy false positives
>
> Deprecating the copy operations because the class has a user-provided
> destructor turns out to have too many false positives; this patch adjusts
> -Wdeprecated-copy to only deprecate if the other copy operation is
> user-provided. To get the earlier behavior, people can explicitly request
> it with -Wdeprecated-copy-dtor.
>
> gcc/c-family/
> * c.opt (Wdeprecated-copy-dtor): New.
> (Wdeprecated-copy): Move to -Wextra.
> gcc/cp/
> * class.c (classtype_has_depr_implicit_copy): Rename from
> classtype_has_user_copy_or_dtor.
> * method.c (lazily_declare_fn): Adjust.
> * decl2.c (cp_warn_deprecated_use): Refer to -Wdeprecated-copy-dtor
> if deprecation is due to a destructor.
>
> Modified:
> trunk/gcc/c-family/ChangeLog
> trunk/gcc/c-family/c.opt
> trunk/gcc/cp/ChangeLog
> trunk/gcc/cp/class.c
> trunk/gcc/cp/cp-tree.h
> trunk/gcc/cp/decl2.c
> trunk/gcc/cp/method.c
> trunk/gcc/doc/invoke.texi
> trunk/gcc/testsuite/g++.dg/cpp0x/depr-copy1.C
so... FIXED now?
More information about the Gcc-bugs
mailing list