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

2002-07-29 Thread Daniel Jacobowitz
On Tue, Jul 30, 2002 at 01:33:34AM +0200, Marek Habersack wrote: > On Tue, Jul 30, 2002 at 01:21:48AM +0200, Martin v. Loewis scribbled: > > Marek Habersack <[EMAIL PROTECTED]> writes: > > > > > OK, I found the statement about the preceeding non-witespace tokens but, > > > still, I would think tha

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

2002-07-29 Thread Marek Habersack
On Tue, Jul 30, 2002 at 01:21:48AM +0200, Martin v. Loewis scribbled: > Marek Habersack <[EMAIL PROTECTED]> writes: > > > 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 matte

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

2002-07-29 Thread Martin v. Loewis
Marek Habersack <[EMAIL PROTECTED]> writes: > 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... The question is whether it should be fixe

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

2002-07-29 Thread Marek Habersack
On Tue, Jul 30, 2002 at 12:35:07AM +0200, Martin v. Loewis scribbled: > [EMAIL PROTECTED] 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: > >

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

2002-07-29 Thread Martin v. Loewis
[EMAIL PROTECTED] 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

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

2002-07-29 Thread grendel
Package: cpp-2.95 Version: 1:2.95.4-10 Severity: important Given the sample code (extracted from the Linux kernel sources): #include #define DRM_NAME "drm" #define KERN_ERR "<7>" #define DRM_ERROR(fmt, args...) \ printf(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __FUNCTION__, ## args)