[Bug c++/106213] -Werror=deprecated-copy-dtor does not trigger warning and error
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 6 20:42:43 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106213
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=94492
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
/* Don't warn if the flag was disabled around the class definition
(c++/94492). */
if (warning_enabled_at (DECL_SOURCE_LOCATION (decl),
OPT_Wdeprecated_copy))
{
auto_diagnostic_group d;
tree ctx = DECL_CONTEXT (decl);
tree other = classtype_has_depr_implicit_copy (ctx);
int opt = (DECL_DESTRUCTOR_P (other)
? OPT_Wdeprecated_copy_dtor
: OPT_Wdeprecated_copy);
More information about the Gcc-bugs
mailing list