diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-04-22 23:18:06 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-04-22 23:19:08 +0100 |
commit | cf88e25a2274f929d4789ca498fa3834836629c9 (patch) | |
tree | ca66caa0b2a90713ad06f4fe95dbea89520898d3 /gcc/cp | |
parent | aac39307e8f589dba231083a3e9aa3d0ff302837 (diff) |
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.
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | 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 <jwakely@redhat.com> + + PR translation/94698 + * class.c (check_field_decls): Change "define" to "declare" in + -Weffc++ diagnostics. + 2020-04-22 Patrick Palka <ppalka@redhat.com> 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 %<operator=(const %T&)%>", t); } else if (! TYPE_HAS_COPY_ASSIGN (t)) warning (OPT_Weffc__, - " but does not define %<operator=(const %T&)%>", t); + " but does not declare %<operator=(const %T&)%>", t); inform (DECL_SOURCE_LOCATION (pointer_member), "pointer member %q+D declared here", pointer_member); } |