Do you trust the "indent" program?
Karl Heuer
karl at ima.isc.com
Sat Jan 5 04:54:21 AEST 1991
In article <1991Jan1.151157.19442 at ux1.cso.uiuc.edu> mcdonald at aries.scs.uiuc.edu (Doug McDonald) writes:
>In article <5970 at stpstn.UUCP> lerman at stpstn.UUCP (Ken Lerman) writes:
>>some CPPs treat the zero length comment /**/ as a concatenation operator.
>
>Not if they are compiling the C language they don't. The string
>/**/ MUST be replaced by a single white space. Period. All pertinent
>references (K&R first edition, K&R second edition, and the actual
>ANSI standard) all agree 100% on this.
Unfortunately, prior to ANSI C there was no such thing as "the C language";
there were multiple dialects of C. One subfamily, including the dialect
described by K&R1, treated comments as whitespace. Another, which includes
the dialect described by the Ritchie compiler with the Reiser cpp, treated
them as empty. Whether this was a bug in the compiler or in the manual cannot
be resolved without further information.
X3J11 accepted both K&R1 and widespread existing practice as evidence in
defining the new language. In this case they went with K&R1, not because it
was sacred text, but because the behavior described by K&R1 is better. (And
because they'd added an alternate way to do concatenation.)
Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint
More information about the Comp.lang.c
mailing list