Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Portability and /**/ Message-ID: <6215@brl-smoke.ARPA> Date: Sat, 1-Aug-87 23:09:55 EDT Article-I.D.: brl-smok.6215 Posted: Sat Aug 1 23:09:55 1987 Date-Received: Sun, 2-Aug-87 10:57:16 EDT References: <949@oakhill.UUCP> <23575@sun.uucp> <4983@prls.UUCP> <118@geovision.UUCP> <167@spar.SPAR.SLB.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15 In article <167@spar.SPAR.SLB.COM> hunt@spar.UUCP (Neil Hunt) writes: >#define Same(token) token >#define Join(left, right) Join(left)right Presumably the last line should have read #define Join(left,right) Same(left)right but that still doesn't work in general, since the token resulting from the macro expansion should not be spliced onto the token to its right, at least not during macro scanning and replacement. I think the outcome of the X3J11 work on this is that preprocessing will be forced to tokenize, and splicing will require explicit use of the new ## operator. Meanwhile, the above trick (with the bug fixed) is probably the most universal approach. Be careful not to include whitespace in the macro invocation argument list.