This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/31182] preprocessor doubles up digits in token pasting
- From: "fang at csl dot cornell dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Mar 2007 04:35:35 -0000
- Subject: [Bug preprocessor/31182] preprocessor doubles up digits in token pasting
- References: <bug-31182-14249@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from fang at csl dot cornell dot edu 2007-03-15 04:35 -------
Subject: Re: preprocessor doubles up digits in token
pasting
With your example, "g++ -E -"
gives me:
<stdin>:2:1: error: pasting "foo2" and "2.2" does not give a valid
preprocessing token
foo22.2
with versions 4.0.1 (powerpc-apple-darwin8)
and 4.2.0 (20070221)
while "cpp -P" (4.0.1) gives me
foo##2.2
and "cpp -P" (4.2.0) gives me
<stdin>:2:1: error: pasting "foo" and "2.2" does not give a valid
preprocessing token
foo22.2
and "cpp -P -traditional" (4.0.1, 4.2.0) give me
foo##2.2
Most odd...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31182