c++: Change -Weffc++ diagnostic to use "declare" (PR 94698)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 Apr 2020 22:18:06 +0000 (23:18 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 22 Apr 2020 22:19:08 +0000 (23:19 +0100)
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.

gcc/cp/ChangeLog
gcc/cp/class.c

index 7380a20f132ce43cba619118085f97bb692d2ff9..a197f00f63ce22a177d5cce94c7f1bd86d4b7ad7 100644 (file)
@@ -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
index 6e14cd37aa4954848c657bf42d607e2df524e319..e211db323772d34869cdbd17468b9be0e2170117 100644 (file)
@@ -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);
        }