aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-04-22 18:02:38 +0100
committerJonathan Wakely <jwakely@redhat.com>2020-04-22 18:02:38 +0100
commitc95d1dd7f5ec48e4c6d622b57843aaa25528170b (patch)
treea41909087b62b68696ff84e630245fa1ceabe244 /gcc/cp/class.c
parent808a6eadda1a353ce3a70556feac128580491b24 (diff)
downloadgcc-c95d1dd7f5ec48e4c6d622b57843aaa25528170b.zip
gcc-c95d1dd7f5ec48e4c6d622b57843aaa25528170b.tar.gz
gcc-c95d1dd7f5ec48e4c6d622b57843aaa25528170b.tar.bz2
c++: Fix misuse of "override" in -Weffc++ warnings (PR 94698)
These warnings have nothing to do with virtual functions, so "override" is inappropriate. The warnings are just talking about defining special members, so let's say that. PR translation/94698 * class.c (check_field_decls): Change "override" to "define" in -Weffc++ diagnostics.
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 41f52e5..6e14cd3 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 override %<%T(const %T&)%>", t, t);
+ " but does not define %<%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 override %<operator=(const %T&)%>", t);
+ " but does not define %<operator=(const %T&)%>", t);
inform (DECL_SOURCE_LOCATION (pointer_member),
"pointer member %q+D declared here", pointer_member);
}