* [committed] gcse, ipa-devirt: Use %wd/%wu instead of HOST_WIDE_INT_PRINT* in diagnostics [PR99288]
@ 2021-02-27 9:46 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-02-27 9:46 UTC (permalink / raw)
To: gcc-patches
Hi!
HOST_WIDE_INT_PRINT* in the string literals of warning/error/inform etc.
make those messages non-translatable, and we have a perfectly fine
alternative when not using system *printf - %w{d,u}.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk
as obvious.
2021-02-27 Jakub Jelinek <jakub@redhat.com>
PR other/99288
* gcse.c (gcse_or_cprop_is_too_expensive): Use %wu instead of
HOST_WIDE_INT_PRINT_UNSIGNED in warning format string.
* ipa-devirt.c (ipa_odr_read_section): Use %wd instead of
HOST_WIDE_INT_PRINT_DEC in inform format string. Fix comment
typos.
--- gcc/gcse.c.jj 2021-01-29 15:18:07.997293117 +0100
+++ gcc/gcse.c 2021-02-26 17:03:23.174388798 +0100
@@ -4011,8 +4011,7 @@ gcse_or_cprop_is_too_expensive (const ch
{
warning (OPT_Wdisabled_optimization,
"%s: %d basic blocks and %d registers; "
- "increase %<--param max-gcse-memory%> above "
- HOST_WIDE_INT_PRINT_UNSIGNED,
+ "increase %<--param max-gcse-memory%> above %wu",
pass, n_basic_blocks_for_fn (cfun), max_reg_num (),
memory_request / 1024);
--- gcc/ipa-devirt.c.jj 2021-01-04 10:25:38.196241037 +0100
+++ gcc/ipa-devirt.c 2021-02-26 17:05:11.904182848 +0100
@@ -4261,13 +4261,12 @@ ipa_odr_read_section (struct lto_file_de
" in another translation unit",
this_enum.vals[j].name, warn_name);
/* FIXME: In case there is easy way to print wide_ints,
- perhaps we could do it here instead of overlfow checpl. */
+ perhaps we could do it here instead of overflow check. */
else if (wi::fits_shwi_p (this_enum.vals[j].val)
&& wi::fits_shwi_p (warn_value))
inform (this_enum.vals[j].locus,
- "name %qs is defined to " HOST_WIDE_INT_PRINT_DEC
- " while another translation unit defines "
- "it as " HOST_WIDE_INT_PRINT_DEC,
+ "name %qs is defined to %wd while another "
+ "translation unit defines it as %wd",
warn_name, this_enum.vals[j].val.to_shwi (),
warn_value.to_shwi ());
else
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-27 9:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-27 9:46 [committed] gcse, ipa-devirt: Use %wd/%wu instead of HOST_WIDE_INT_PRINT* in diagnostics [PR99288] Jakub Jelinek
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).