re PR ipa/80000 (diagnostics: trailing spaces in "one definition rule ")
authorJakub Jelinek <jakub@redhat.com>
Fri, 8 Mar 2019 10:52:38 +0000 (11:52 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 8 Mar 2019 10:52:38 +0000 (11:52 +0100)
PR ipa/80000
* ipa-devirt.c (compare_virtual_tables): Remove two trailing spaces
from diagnostics.  Formatting fixes.

PR target/85665
* ipa-devirt.c (odr_types_equivalent_p): Fix grammar in
warn_odr diagnostics.

From-SVN: r269488

gcc/ChangeLog
gcc/ipa-devirt.c

index 54f3cd84ca2a13d4a9384ed3382e76f9a2f6ea0b..b61653538e4f389d26f84cf9589713126fc68388 100644 (file)
@@ -1,5 +1,13 @@
 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
 
+       PR ipa/80000
+       * ipa-devirt.c (compare_virtual_tables): Remove two trailing spaces
+       from diagnostics.  Formatting fixes.
+
+       PR target/85665
+       * ipa-devirt.c (odr_types_equivalent_p): Fix grammar in
+       warn_odr diagnostics.
+
        PR other/80058
        * lra-constraints.c (process_alt_operands): Avoid one space before
        " at the end of line and another after " on another line in a string
index bba73b2d1e2e8d39cb7fb4bd528c2cfe57fb4164..6d891e81a49aa0dee7e1f4538e035b4dcfbf86c5 100644 (file)
@@ -842,17 +842,16 @@ compare_virtual_tables (varpool_node *prevailing, varpool_node *vtable)
            {
              class_type->odr_violated = true;
              auto_diagnostic_group d;
-             if (warning_at (DECL_SOURCE_LOCATION
-                               (TYPE_NAME (DECL_CONTEXT (vtable->decl))),
-                             OPT_Wodr,
+             tree ctx = TYPE_NAME (DECL_CONTEXT (vtable->decl));
+             if (warning_at (DECL_SOURCE_LOCATION (ctx), OPT_Wodr,
                              "virtual table of type %qD violates "
-                             "one definition rule  ",
+                             "one definition rule",
                              DECL_CONTEXT (vtable->decl)))
                {
-                 inform (DECL_SOURCE_LOCATION
-                           (TYPE_NAME (DECL_CONTEXT (prevailing->decl))),
-                         "the conflicting type defined in another translation "
-                         "unit has virtual table of different size");
+                 ctx = TYPE_NAME (DECL_CONTEXT (prevailing->decl));
+                 inform (DECL_SOURCE_LOCATION (ctx),
+                         "the conflicting type defined in another translation"
+                         " unit has virtual table of different size");
                }
            }
          return;
@@ -1607,7 +1606,8 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned,
                if (DECL_BIT_FIELD (f1) != DECL_BIT_FIELD (f2))
                  {
                    warn_odr (t1, t2, f1, f2, warn, warned,
-                             G_("one field is bitfield while other is not"));
+                             G_("one field is a bitfield while the other "
+                                "is not"));
                    return false;
                  }
                else