https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114775
--- Comment #7 from Nikita Kniazev <nok.raven at gmail dot com> --- (In reply to Andrew Pinski from comment #6) > (In reply to Nikita Kniazev from comment #5) > > > So there is mingw_printf and gnu_printf attributes for mingw because at > > > one point %ll didn't exist for mingw and nobody has updated it since then. > > > > Do you mean that binutils and [other code out > > there](https://github.com/ > > search?q=%2F__attribute__%5Cs*%5C%28%5Cs*%5C%28%5Cs*_*format_*%5Cs*%5C%28%5Cs > > *_*printf%2F&type=code) should be updated to use gnu_printf in attributes? > > That would be a lot of work, clang doesn't know gnu_printf, and is wrong for > > actual printf wrappers. > > This has been documented/implemented this way for ~16 years now (for GCC > 4.4.0), r0-86297-g6590fc9fbd071d . > > https://inbox.sourceware.org/gcc-patches/OF604F1098.0E3FE32A-ONC1257408. > 003bb78c-c1257408.003ce...@onevision.de/ Which attributes should use for void my_printf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); printf(fmt, ap); va_end(ap); } so it will behave correctly with any combination of -std=c89, -std=c99, __USE_MINGW_ANSI_STDIO=0, __USE_MINGW_ANSI_STDIO=1, _UCRT