* [PATCH] Two diagnostics fixes for ipa-devirt.c (PR ipa/80000, PR target/85665)
@ 2019-03-07 19:35 Jakub Jelinek
2019-03-08 10:38 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2019-03-07 19:35 UTC (permalink / raw)
To: Jan Hubicka; +Cc: gcc-patches
Hi!
The following patch fixes two diagnostics issues in ipa-devirt.c, one
is trailing space in one warning, the other is lack of articles in another
warning, both reported by the translation team.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2019-03-07 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.
--- gcc/ipa-devirt.c.jj 2019-01-10 11:43:14.380377810 +0100
+++ gcc/ipa-devirt.c 2019-03-07 16:21:14.641937211 +0100
@@ -842,17 +842,16 @@ compare_virtual_tables (varpool_node *pr
{
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
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
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Two diagnostics fixes for ipa-devirt.c (PR ipa/80000, PR target/85665)
2019-03-07 19:35 [PATCH] Two diagnostics fixes for ipa-devirt.c (PR ipa/80000, PR target/85665) Jakub Jelinek
@ 2019-03-08 10:38 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2019-03-08 10:38 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Jan Hubicka, GCC Patches
On Thu, Mar 7, 2019 at 8:32 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> Hi!
>
> The following patch fixes two diagnostics issues in ipa-devirt.c, one
> is trailing space in one warning, the other is lack of articles in another
> warning, both reported by the translation team.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
OK.
RIchard.
> 2019-03-07 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.
>
> --- gcc/ipa-devirt.c.jj 2019-01-10 11:43:14.380377810 +0100
> +++ gcc/ipa-devirt.c 2019-03-07 16:21:14.641937211 +0100
> @@ -842,17 +842,16 @@ compare_virtual_tables (varpool_node *pr
> {
> 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
> 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
>
> Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-08 10:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 19:35 [PATCH] Two diagnostics fixes for ipa-devirt.c (PR ipa/80000, PR target/85665) Jakub Jelinek
2019-03-08 10:38 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).