Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: ANSI C and comment preprocessing
Message-ID: <1991Jan17.233106.19817@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <11228@cae780.csi.com> <14793@smoke.brl.mil> <3303@unisoft.UUCP>
Date: Thu, 17 Jan 1991 23:31:06 GMT

In article <3303@unisoft.UUCP> greywolf@unisoft.UUCP (The Grey Wolf) writes:
>If comments are expanded to spaces, this kind of breaks things like
>
>#define	operate_with(x) \
>	dbm_put(p->pw_/**/e); \
>	munge_data(p->pw_/**/e, munge_factor[1]); \
>	login->pw_/**/e = p->pw_/**/e;
>
>doesn't it?

This macro is already broken; even before ANSI C, there were many C compilers
that wouldn't do what you're expecting with it.

>How does ANSI token-pasting work? (DON'T say RTFM because I don't *have*
>TFM!)  Is is something similar to what I've provided above as an example?

No.  This revolting kludge has been flushed, in favor of a language feature
that doesn't rely so heavily on implementation accidents.  "##" is the
ANSI C token-concatenation operator.
-- 
If the Space Shuttle was the answer,   | Henry Spencer at U of Toronto Zoology
what was the question?                 |  henry@zoo.toronto.edu   utzoo!henry
