https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52952
--- Comment #39 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- A summary of what is still pending: 1. Handle macros #define c " %d " __builtin_printf(c, 0.5); 2. Handle non-contiguous strings: __builtin_printf(" %" "d ", 0.5); 3. Handle const arrays: const char a[] = " %d "; __builtin_printf(a, 0.5); I have an idea on how to fix 1 and 2 but no idea how to fix 3.