From cf88e25a2274f929d4789ca498fa3834836629c9 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 22 Apr 2020 23:18:06 +0100 Subject: [PATCH] c++: Change -Weffc++ diagnostic to use "declare" (PR 94698) Change the wording again, for the reasons given by Jason in https://gcc.gnu.org/pipermail/gcc-patches/2020-April/544362.html PR translation/94698 * class.c (check_field_decls): Change "define" to "declare" in -Weffc++ diagnostics. --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/class.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7380a20f132..a197f00f63c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2020-04-22 Jonathan Wakely + + PR translation/94698 + * class.c (check_field_decls): Change "define" to "declare" in + -Weffc++ diagnostics. + 2020-04-22 Patrick Palka PR c++/94719 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 6e14cd37aa4..e211db32377 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3838,13 +3838,13 @@ check_field_decls (tree t, tree *access_decls, if (! TYPE_HAS_COPY_CTOR (t)) { warning (OPT_Weffc__, - " but does not define %<%T(const %T&)%>", t, t); + " but does not declare %<%T(const %T&)%>", t, t); if (!TYPE_HAS_COPY_ASSIGN (t)) warning (OPT_Weffc__, " or %", t); } else if (! TYPE_HAS_COPY_ASSIGN (t)) warning (OPT_Weffc__, - " but does not define %", t); + " but does not declare %", t); inform (DECL_SOURCE_LOCATION (pointer_member), "pointer member %q+D declared here", pointer_member); } -- 2.30.2