On Thu, Jan 20, 2022 at 09:56:59AM -0700, Martin Sebor wrote: > > With normal -Wformat I see all expected warnings in: > > char *foo (const char *) __attribute__((format_arg(1))); > > void bar (const char *, ...) __attribute__((format(printf, 1, 2))); > > -Wformat-diag is internal to GCC and needs one of the GCC-internal > attributes to enable, like __gcc_cxxdiag__, for example like this: > > __attribute__ ((format (__gcc_cxxdiag__, 1, 2))) > void bar (const char *, ...); > > With that it triggers in all the same instances as -Wformat below > (as near I can tell for a modified test case).
Glad to hear that, but then I don't understand why we didn't warn on cp/error.cc before Martin L.'s change when --disable-nls wasn't used. Jakub