Commit cf88e25a by Jonathan Wakely

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.
parent aac39307
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> 2020-04-22 Patrick Palka <ppalka@redhat.com>
PR c++/94719 PR c++/94719
......
...@@ -3838,13 +3838,13 @@ check_field_decls (tree t, tree *access_decls, ...@@ -3838,13 +3838,13 @@ check_field_decls (tree t, tree *access_decls,
if (! TYPE_HAS_COPY_CTOR (t)) if (! TYPE_HAS_COPY_CTOR (t))
{ {
warning (OPT_Weffc__, 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)) if (!TYPE_HAS_COPY_ASSIGN (t))
warning (OPT_Weffc__, " or %<operator=(const %T&)%>", t); warning (OPT_Weffc__, " or %<operator=(const %T&)%>", t);
} }
else if (! TYPE_HAS_COPY_ASSIGN (t)) else if (! TYPE_HAS_COPY_ASSIGN (t))
warning (OPT_Weffc__, 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), inform (DECL_SOURCE_LOCATION (pointer_member),
"pointer member %q+D declared here", pointer_member); "pointer member %q+D declared here", pointer_member);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment