Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!sun!guy From: guy@sun.UUCP Newsgroups: net.lang.c++,net.lang.c Subject: Re: System V preprocessor problem with Message-ID: <3597@sun.uucp> Date: Mon, 28-Apr-86 22:11:05 EDT Article-I.D.: sun.3597 Posted: Mon Apr 28 22:11:05 1986 Date-Received: Fri, 2-May-86 06:34:34 EDT References: <410@cit-vax.Caltech.Edu> <228@sfsup.UUCP> Followup-To: net.lang.c Distribution: net Organization: Sun Microsystems, Inc. Lines: 22 Xref: watmath net.lang.c++:173 net.lang.c:8758 > Try this fix for system V cpp: > > #define name2(a,b) a/**/b > #define name3(a,b,c) a/**/b/**/c > > This works because the system V cpp strips the comments from the input. So do earlier versions of Reiser's "cpp"; this is the "canonical" way of concatenating two arguments to a macro, and is heavily used in 4BSD. It has, however, two problems: 1) If you run your code through "lint", it won't work - "cpp" is run by "lint" with the "-C" flag, which tells it not to strip comments (for obvious reasons). 2) It is not a guaranteed property of the C language, but a quirk of the implementation, so it will not work in general. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.arpa