Is this correct action for the c compiler/preprocessor ??

Chris Torek chris at umcp-cs.UUCP
Sun Nov 3 10:40:48 AEST 1985


In article <473 at basser.oz> john at basser.oz (John Mackin) writes:

>In article <270 at cornell.UUCP> jqj at cornell.UUCP (J Q Johnson) writes:

>> Most versions of pcc ignore stringness (``"'') when looking for tokens 
>> for macro replacement. ...  K&R are silent on the lexical issues
>> involved, so this cannot be considered incorrect.

>I couldn't let such a glaring misstatement pass.  Page 207, sec. 12.1:
>	``Text inside a string or a character constant is not
>	  subject to replacement.''

Surprise, surprise, this is actually ambiguous.  When I first read
this I assumed it meant `text inside a string or character constant
anywhere'.  It really means `text inside a string or character
constant (except in the replacement portion of a macro)'.
Unfortunately the former is the more reasonable interpretation
(naturally---it is mine :-) ), so the ANSI standard has settled on
that, and introduces some new `experimental' `stringizing' macro
expansion features.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.unix.wizards mailing list