CPP warning while compiling linux-kernel-2.4, correct?

Geoff Keating geoffk@geoffk.org
Mon Nov 13 14:25:00 GMT 2000


"Zack Weinberg" <zackw@stanford.edu> writes:

> On Mon, Nov 13, 2000 at 10:36:45PM +0100, Franz Sirl wrote:
> > #define dfprintk(fac,args...)  do { ifdebug( fac ) printk( ## args ); }

> Yes and yes.  This is a classic example of superstitious use of ##.
> It has never been necessary in this context.  Probably someone thought
> that you had to put ## before a varargs name, because it is commonly
> used there to delete a preceding comma.

In fact, I believe that according to the previous docs, if you ever
had an empty 'args', you would have gotten

do { ifdebug( fac ) printk ); }

or possibly

do { ifdebug( fac )  ); }

both of which are syntax errors.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


More information about the Gcc-bugs mailing list