https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65040
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> --- #include <stdio.h> int main() { printf ("%x%u\n", 4, 4); } > gcc-5 -Wall t.c -Wformat=2 t.c: In function 'main': t.c:4:11: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'int' [-Wformat=] printf ("%x%u\n", 4, 4); ^ t.c:4:11: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'int' [-Wformat=] that's undesirable as well (the constant fits in an unsigned int).