https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64223
--- Comment #4 from Harald van Dijk <harald at gigawatt dot nl> --- Ah, GCC does not treat format(printf) and format(__printf__) as equivalent, and the built-in declaration uses format(printf). With custom functions, two warnings can also be generated: int myprintf (const char *, ...) __attribute__ ((__format__ (printf, 1, 2))); int myprintf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); int main(void) { myprintf("%d\n", 0L); return 0; } When combined with gnu_printf and __gnu_printf__, it can become even worse.