qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 00/15] Debug output revamp
Date: Fri, 22 Feb 2013 18:22:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Richard Henderson <address@hidden> writes:

> On 02/22/2013 08:16 AM, Andreas Färber wrote:
>> I would be willing to do a macro-based v3 using do { ... } while (0) if
>> maintainers can reach agreement on that and on how to do the if (0).
>
> FWIW, I'm in favor of the
>
> #ifndef DEBUG
> # define DEBUG 0
> #endif
> #define MACRO_NAME(...) \
>   do { if (DEBUG) { log(...) } } while (0)
>
> sort of solution.  Immediate constant into the IF, which even an -O0
> compile will delete as dead.

Looks good to me.



reply via email to

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