https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93836
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2021-10-28 --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- The -Wformat checkers can't detect using the HOST_WIDE_INT_PRINT because by the time they run macros have been expanded and adjacent string literals concatenated. They can only detect this problem when compiling for the targets with the unsupported format directives (like %I64d), which I would expect they already do. The problem could be detected by some script, maybe the one that scrapes the format strings out of the sources and generates the gcc.pot file. IMO, a good time to do this is either during bootstrap, or during make check, regardless of the target. Anyway, the problematic code is still there in GCC 12(see below) so confirmed. 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); else if (pru_ctable[i].valid && pru_ctable[i].base != base) error ("redefinition of %<CTABLE_ENTRY " "%" HOST_WIDE_INT_PRINT "d%>", i); else { if (base & 0xff) warning (0, "%<CTABLE_ENTRY%> base address is not " "a multiple of 256"); pru_ctable[i].base = base; pru_ctable[i].valid = true; }