From: Robert Schiele <rschiele@uni-mannheim.de>
To: Jamie Risk <jamie_risk@yahoo.ca>
Cc: linux-gcc@vger.kernel.org, linux-newbie@vger.kernel.org,
linux-c-programming@vger.kernel.org
Subject: Re: warnings appearing during preprocessor string concatenation (##)
Date: Thu, 6 Mar 2003 14:10:47 +0100 [thread overview]
Message-ID: <20030306131047.GA17788@schiele.local> (raw)
In-Reply-To: <b45mva$re8$2@main.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 898 bytes --]
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:rschiele@uni-mannheim.de
[-- Attachment #2: Type: application/pgp-signature, Size: 481 bytes --]
prev parent reply other threads:[~2003-03-06 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-05 20:34 warnings appearing during preprocessor string concatenation (##) Jamie Risk
2003-03-06 13:10 ` Robert Schiele [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030306131047.GA17788@schiele.local \
--to=rschiele@uni-mannheim.de \
--cc=jamie_risk@yahoo.ca \
--cc=linux-c-programming@vger.kernel.org \
--cc=linux-gcc@vger.kernel.org \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.