[gcc(refs/vendors/ARM/heads/arm-perf-staging)] c++: Change -Weffc++ diagnostic to use "declare" (PR 94698)
Tamar Christina
tnfchris@gcc.gnu.org
Fri Jul 17 14:52:36 GMT 2020
https://gcc.gnu.org/g:cf88e25a2274f929d4789ca498fa3834836629c9
commit cf88e25a2274f929d4789ca498fa3834836629c9
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Apr 22 23:18:06 2020 +0100
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.
Diff:
---
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 <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);
}
More information about the Gcc-cvs
mailing list