This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/31182] preprocessor doubles up digits in token pasting



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]