gcc error: warning: pasting "syn" and ")" does not give a valid preprocessing token

Kiet Tran ktran@extremenetworks.com
Wed Jul 4 16:42:00 GMT 2001


Hi Neil;
The attachment is b.c . I have embbeded all the header files
except
those common to a unix system. The file now will compile but if
you
remove the space character as decribed in my earlier message,
the
preprocessor will not replace the 'state' string. The compiling
instruction:

> gcc -E b.c > junk


Thank you,
Regards,
Kiet


Neil Booth wrote:

> Kiet Tran wrote:-
>
> > #define TCP_EXTERN(state) \
> > extern pspec_t *##state##_rcv_rst(tcb_t *,pspec_t *), \
> > ....
> >
> > I removed the leading '##' pair and found that the
> > passing parameter of the macro was not replacing
> > 'state' word. The preprocessor replaced the 'state'
> > parameter after I insert a space between the '*' character
> > and 'state##' word. Is this a real bug in the preprocessor?
>
> Please provide a complete example.
>
> Neil.


More information about the Gcc-bugs mailing list