Path: utzoo!attcan!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.co.jp (Norman Diamond) Newsgroups: comp.std.c Subject: Token pasting in #include directive [repost] Message-ID: <11160@riks.csl.sony.co.jp> Date: 21 Nov 89 06:45:03 GMT Reply-To: diamond@ws.sony.junet (Norman Diamond) Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 25 This question is also a repost. It seems to have gotten lost between kddlabs and the rest of the world, and never got a reply. According to section 3.8.2, page 89 lines 14 to 17, if pp-tokens are macro replaced in an #include directive, the implementation might choose to combine preprocessor tokens between a pair of " characters by, for example, putting a space between each pair of preprocessor tokens. (An implementation might do this because it always puts spaces between preprocessor tokens, because two adjacent preprocessor tokens of - - are not supposed to become a single real token --.) Therefore in the example on page 93, line 17 might not yield the result shown on line 23. Line 23 is certainly a possibility, but another possibility, depending on the implementation, is: #include "vers2 .h" with an imbedded space. I must ask again which carries more weight, the stated rules or the examples. -- Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work) Should the preceding opinions be caught or | James Bond asked his killed, the sender will disavow all knowledge | ATT rep for a source of their activities or whereabouts. | licence to "kill".