[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#154767: cpp-2.95: cpp fails to parse macros with varargs correctly



On Tue, Jul 30, 2002 at 12:35:07AM +0200, Martin v. Loewis scribbled:
> grendel@thanes.org writes:
> 
> >         printf(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __FUNCTION__, ##
> > args)
> [...]
> > which is invalid C syntax.  ##' gets rid of the comma, so we get the
> > following instead:
> > 
> >      fprintf (stderr, "success!\n")
> > 
> > 
> > Which is not the case. That bug breaks the compile of the 2.4.19-rc3-ac4
> > kernel (the DRM tree). Both cpp 3.0 and 3.1 work correctly.
> 
> You are not reading the info docs carefully: you need a space between
> the __FUNCTION__ and the comma. It is probably still a bug in the
> preprocessor that it deletes the __FUNCTION__ token and not the comma
> token, but that bug is not important since it can be easily
> worked-around.
OK, I found the statement about the preceeding non-witespace tokens but,
still, I would think that something that breaks the kernel compile should be
important no matter how trivial to work-around it is...

regards,
marek

Attachment: pgpVTIwwAGcIP.pgp
Description: PGP signature


Reply to: