Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site basser.SUN Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!drutx!houxe!hogpc!houti!ariel!vax135!floyd!harpo!decvax!mulga!munnari!basser!boyd From: boyd@basser.UUCP Newsgroups: net.bugs,net.lang.c Subject: Re: Bug (?) in C preprocessor Message-ID: <304@basser.SUN> Date: Tue, 29-May-84 14:52:32 EDT Article-I.D.: basser.304 Posted: Tue May 29 14:52:32 1984 Date-Received: Fri, 1-Jun-84 21:57:02 EDT References: <204@elecvax.SUN> Organization: Dept of C.S., University of Sydney Lines: 32 No. The reference manual states: "Each occurrance of an identifier mentioned in the formal parameter list of the definition is replaced by the corresponding token string from the call." "...the replacement string is rescanned for more defined identifiers." "Text inside a string or character constant is not subject to replacement." Hence: #define quote(x) "x" #define gooeys sooterkin quote(gooeys) expands to "gooeys" and not "sooterkin". I have written a C preprocessor that adheres to the most recent standard. The standard has these "additions": #elif expression and defined(name) in #if expressions I wouldn't advise a change to the preproccessor to do this alternate expansion because by definition it would NOT be the C preproccessor. --- >From the VB can of Boyd Roberts. ...!decvax!mulga!boyd:basser