https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97622
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |--- Keywords| |diagnostic CC| |msebor at gcc dot gnu.org Status|RESOLVED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org --- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #4) > No. > If it is the -Wformat-diag warning, just ignore it. It has been added > without any attempt to resolve the warnings and warns for many things that > are just fine. Without any attempt? Hardly. I committed a 12 patch series to resolve most instances when I introduced the warning: https://gcc.gnu.org/pipermail/gcc-patches/2019-May/521567.html And then proceeded to clean up more here: https://gcc.gnu.org/pipermail/gcc-patches/2019-May/522333.html and more still here: https://gcc.gnu.org/pipermail/gcc-patches/2019-June/523281.html Others have cleaned up a bunch more later that either remained or crept in because the warning doesn't trigger errors. See r272607, r272608, r272789, r273468, r273475, and more. The few outstanding instances should be fixed and the error suppression for the warning removed. The one in comment #0 can be worked around with by making the quote an argument to a %c. An an arguably more robust solution would be to introduce another attribute that doesn't enforce some of the rules for pp_printf(). Let me take care of this.