Skip to content

Commit

Permalink
c++: Change -Weffc++ diagnostic to use "declare" (PR 94698)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jwakely committed Apr 22, 2020
1 parent aac3930 commit cf88e25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions gcc/cp/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2020-04-22 Jonathan Wakely <[email protected]>

PR translation/94698
* class.c (check_field_decls): Change "define" to "declare" in
-Weffc++ diagnostics.

2020-04-22 Patrick Palka <[email protected]>

PR c++/94719
Expand Down
4 changes: 2 additions & 2 deletions gcc/cp/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit cf88e25

Please sign in to comment.