Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!ucbcad!ucbvax!decvax!decwrl!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: need cpp macros to concatenate names Message-ID: <18151@sun.uucp> Date: Wed, 6-May-87 01:21:20 EDT Article-I.D.: sun.18151 Posted: Wed May 6 01:21:20 1987 Date-Received: Fri, 8-May-87 01:01:47 EDT References: <634@calma.UUCP> <18010@sun.uucp> <6132@hi.UUCP> Sender: news@sun.uucp Distribution: na Lines: 30 Xref: utgpu comp.unix.wizards:2015 comp.unix.questions:1936 > It don't work that way on BSD releases. Umm, the "cpp" distributed with 4.3BSD isn't, as I remember, that violently different (as determined by "diff") from that distributed with V7. (Differences exist, but nothing as fundamental as the order in which things are done changed. Even the S5 one isn't violently different once you run it and a V7/S3/4BSD one through something like "indent" - the S5 one was reformatted to eliminate the original's somewhat, umm, idiosyncratic formatting.) Moreover, I'm not sure what "it don't work that way" refers to, except to the warning about concat(foo, bar) I just built the 4.3BSD "cpp" here and it does, in fact, expand "concat(foo, bar)" to " foo bar". > The comment gets stripped before either foo or bar get replaced by any > other macros. Did I say it didn't get so replaced in the "cpp" as distributed with other releases? No. In fact, I just tried your example with what is basically an S5R3 "cpp", and it returns "foobar"; the only difference is that the white space between the "concat(x,y)" and the "x/**/y" in the definition isn't considered part of the definition of the macro. So what "don't work that way on BSD releases" but "works that way" on other releases? The "x/**/y" stuff seems to work the same way on all versions of the Reiser preprocessor; the question is whether it works the same way in compilers not using the Reiser preprocessor (the answer is "maybe yes, maybe no, don't expect it to").