[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Handling of fall through code

From: Markus Armbruster
Subject: Re: [Qemu-devel] Handling of fall through code
Date: Tue, 09 Jul 2019 07:40:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Stefan Weil <address@hidden> 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).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]