From: "Emmanuel STAPF" <manu@stapf.org>
To: <linuxppc-dev@lists.linuxppc.org>
Subject: Strange warning during C compilation
Date: Tue, 6 Nov 2001 00:55:19 -0800 [thread overview]
Message-ID: <002701c166a0$c33d0080$f5732c0c@venice2> (raw)
In-Reply-To: <000401c15d6d$77730690$f5732c0c@venice2>
Hi,
I'm getting the following warning: warning: pasting "h" and "(" does not
give a valid preprocessing token
Here is the piece of code that shows the problem:
#define CAT(a,b)a ## b
#define TEST_MACRO(n,c,a) (CAT(n,_done) ? CAT(n,_result) :
CAT(c,a))
extern void* h();
extern void f(void*);
extern void* h_result;
extern char h_done;
void k (void* titi)
{
f((TEST_MACRO(h,h,())));
}
If you save this code in a test.c file and use `gcc -Wall -c test.c'
here is what you get:
test.c:11:12: warning: pasting "h" and "(" does not give a valid
preprocessing token
Any idea what is wrong here? My gcc version is 3.01. It was also
happening on my gcc version 2.96 with a slightly different error
message: warning: pasting would not give a valid preprocessing token. I
tried with an even older version (2.7.2.3) and no warnings.
Regards,
Manu
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-11-06 8:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-20 7:03 Error when linking Emmanuel STAPF
2001-10-20 7:25 ` Kaoru Fukui
2001-10-20 16:27 ` Emmanuel STAPF
2001-10-20 18:47 ` Brad Boyer
2001-10-20 21:28 ` Emmanuel STAPF
2001-10-21 4:26 ` Brad Boyer
2001-10-25 15:55 ` Emmanuel STAPF
2001-11-06 8:55 ` Emmanuel STAPF [this message]
2001-11-06 9:55 ` Strange warning during C compilation Franz Sirl
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='002701c166a0$c33d0080$f5732c0c@venice2' \
--to=manu@stapf.org \
--cc=linuxppc-dev@lists.linuxppc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).