https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77328
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> --- The GCC 10 output looks almost correct. I think two things should change: 1) the warning should underline the directive (like the second note), not the whole format string 2) the second note should be dropped when it's on the same line as the warning 77328.c:9:8: warning: format '%i' expects argument of type 'int', but argument 4 has type 'double' [-Wformat=] 9 | P (d, "%i %i", 1, 2.0); | ^~~~~~~ ~~~ | | | double 77328.c:5:45: note: in definition of macro 'P' 5 | #define P(d, f, a, b) __builtin_sprintf (d, f, a, b) | ^ 77328.c:9:13: note: format string is defined here 9 | P (d, "%i %i", 1, 2.0); | ~^ | | | int | %f