On Wed, Mar 05, 2003 at 03:34:39PM -0500, Jamie Risk wrote:
> I have the following line in my code,
> 
> #define FEATURE(select)     feature_structure. ## select ## .member
>   ...
>    FEATURE(test);
> 
> and when I run it through the compiler (gcc 3.2.2 on Linux x86) I get the
> _warning_
> 
>   file.c:111:32: warning: pasting "." and "test" does not give a valid
> preprocessing token
>   file.c:111:32: warning: pasting "test" and "." does not give a valid
> preprocessing token
> 
> If I look at the preprocessor output, (gcc's -E option) it produces what I'm
> hoping for, although I'd like to avoid the warning.  Suggestions?

Just remove the '##' operator.  The preprocessor is right here, there
is nothing to concatenate to a token in your example.

Robert

-- 
Robert Schiele                  Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker      mailto:[EMAIL PROTECTED]

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to