[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Qemu-devel] [PATCH v2 01/16] x86: Convert conditional compilation of debug printfs to regular ifs
El Tue, 13 May 2014 08:38:26 -0600 Eric Blake <eblake@xxxxxxxxxx> escribiÃ: > Although __VA_ARGS__ is required by C99, the use of ##__VA_ARGS__ is a > gcc extension; are you sure that all other supported compilers handle > it? (I guess that's just clang) > > If you want something portable to C99, just use one fewer macro > argument, so that you are guaranteed that __VA_ARGS__ will be > non-empty (that is, subsume fmt into the ...): > > #define DEBUG(...) \ > QEMU_DPRINTF(DEVICE_ASSIGNMENT_DEBUG_ENABLED, \ > "pci_assign", __VA_ARGS__) > I found some problems to convert from ## __VA_ARGS__ to __VA_ARGS__ in some parts, and as I asked in IRC, it was pointed that "our HACKING document recommends the fmt, ## __VA_ARGS__ approach, and it obviously works on all the compilers we care about". So I will leave this as it is now. Marc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |