https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118991
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The pru one is a clear bug, it uses gcc-internal-format and one should use the
w modifier in that case, HOST_WIDE_INT_PRINT* are for c-format only.
2025-02-25 Jakub Jelinek <[email protected]>
PR translation/118991
* config/pru/pru-pragma.cc (pru_pragma_ctable_entry): Use %wd
instead of %" HOST_WIDE_INT_PRINT "d to print a hwi in error.
--- gcc/config/pru/pru-pragma.cc.jj 2025-01-02 11:47:07.120544741 +0100
+++ gcc/config/pru/pru-pragma.cc 2025-02-25 13:01:32.766143686 +0100
@@ -58,11 +58,9 @@ pru_pragma_ctable_entry (cpp_reader *)
if (type != CPP_EOF)
error ("junk at end of %<#pragma CTABLE_ENTRY%>");
else if (i >= ARRAY_SIZE (pru_ctable))
- error ("%<CTABLE_ENTRY%> index %" HOST_WIDE_INT_PRINT "d"
- " is not valid", i);
+ error ("%<CTABLE_ENTRY%> index %wd is not valid", i);
else if (pru_ctable[i].valid && pru_ctable[i].base != base)
- error ("redefinition of %<CTABLE_ENTRY "
- "%" HOST_WIDE_INT_PRINT "d%>", i);
+ error ("redefinition of %<CTABLE_ENTRY %wd%>", i);
else
{
if (base & 0xff)
For avr and output_operand_lossage, I agree one might need to print it into a
separate buffer first.