This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



"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>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]