https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68052
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-10-07 Ever confirmed|0 |1 --- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #7) > That example doesn't work, here's the preprocessed source for a corrected > version: Without the system headerness: 4:11: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat=] "<3>" ^~~~~ 5:20: note: format string is defined here "%s", 3); ~^ %d The warning points to '"', which is define in the system header, thus suppressed. Like in the examples above, it should say: 5:20: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat=] "%s", 3); ~^ %d In C++, there is no warning whatsoever for this, so that may be a different bug.