Stefan Weil <s...@weilnetz.de> writes: > Am 08.07.19 um 06:40 schrieb Markus Armbruster: > [...] >> However, the gnu_ in gnu_scanf tells the compiler we're linking with the >> GNU C Library, which seems unwise. Hmm, we already use gnu_printf. >> Commit 9c9e7d51bf0: >> >> Newer gcc versions support format gnu_printf which is >> better suited for use in QEMU than format printf >> (QEMU always uses standard format strings (even with mingw32)). >> >> Should we limit the use of gnu_printf to #ifdef _WIN32? > > > No, because we don't want lots of conditional code with different > format strings for POSIX and Windows (I made that commit 9 years ago).
I'm afraid I failed to express myself clearly. I'm not proposing to conditionally use MS conversion specifications instead of ISO C ones. That's mess we can do without indeed. The documentation of gnu_printf vs. plain printf format attribute in "The GNU Compiler Collection" made me expect gnu_printf accepts extensions over ISO C provided by glibc, while plain printf rejects them. Since we don't require glibc, catching use of extensions would be useful, even if we still had to use gnu_printf with MinGW. However, it appears not to be the case (I tried on Fedora 30). [...]