El Tue, 13 May 2014 08:38:26 -0600 Eric Blake <ebl...@redhat.com> 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