Re: [Qemu-devel] Re: [PATCH 1/5] HACKING: add preprocessor rules

2010-08-17 Thread Blue Swirl
On Mon, Aug 16, 2010 at 6:32 PM, Anthony Liguori wrote: > On 08/16/2010 01:05 PM, Blue Swirl wrote: >> >> On Sun, Aug 15, 2010 at 9:27 PM, Andreas Schwab >>  wrote: >> >>> >>> Blue Swirl  writes: >>> >>> +For variadic macros, stick with C99 syntax: + +#define DPRINTF(fmt, ...)

Re: [Qemu-devel] Re: [PATCH 1/5] HACKING: add preprocessor rules

2010-08-16 Thread Anthony Liguori
On 08/16/2010 01:05 PM, Blue Swirl wrote: On Sun, Aug 15, 2010 at 9:27 PM, Andreas Schwab wrote: Blue Swirl writes: +For variadic macros, stick with C99 syntax: + +#define DPRINTF(fmt, ...) \ +do { printf("IRQ: " fmt, ## __VA_ARGS__); } whi

[Qemu-devel] Re: [PATCH 1/5] HACKING: add preprocessor rules

2010-08-16 Thread Blue Swirl
On Sun, Aug 15, 2010 at 9:27 PM, Andreas Schwab wrote: > Blue Swirl writes: > >> +For variadic macros, stick with C99 syntax: >> + >> +#define DPRINTF(fmt, ...)                                       \ >> +    do { printf("IRQ: " fmt, ## __VA_ARGS__); } while (0) > > That's not C99 syntax, the com

[Qemu-devel] Re: [PATCH 1/5] HACKING: add preprocessor rules

2010-08-15 Thread Andreas Schwab
Blue Swirl writes: > +For variadic macros, stick with C99 syntax: > + > +#define DPRINTF(fmt, ...) \ > +do { printf("IRQ: " fmt, ## __VA_ARGS__); } while (0) That's not C99 syntax, the combination with ## is a gcc extension. In C99 you cannot have an em