diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-03-08 11:52:38 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-03-08 11:52:38 +0100 |
commit | 4ee494c053787ec7f8f9a7db6c98f32c11259baf (patch) | |
tree | 8fc16499052641649fd2153c812d4dfd26a4b904 /gcc/ipa-devirt.c | |
parent | 0d7bac69b78fbb3bc2d088e7777472d261ea0a21 (diff) | |
download | gcc-4ee494c053787ec7f8f9a7db6c98f32c11259baf.zip gcc-4ee494c053787ec7f8f9a7db6c98f32c11259baf.tar.gz gcc-4ee494c053787ec7f8f9a7db6c98f32c11259baf.tar.bz2 |
re PR ipa/80000 (diagnostics: trailing spaces in "one definition rule ")
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
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r-- | gcc/ipa-devirt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index bba73b2..6d891e8 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -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 |