preprocessor fun

Henry Spencer henry at utzoo.uucp
Mon Apr 10 09:25:42 AEST 1989


In article <1989Apr7.192628.4547 at utzoo.uucp> I wrote:
>	#ifdef notdef
>	#hahafooledyou
>	#endif
>
>... Show me where it says that the middle line is a directive at all.
>I claim that it is two preprocessing tokens which do not happen to be a
>directive...

To head off a swarm of wrong followups, there is indeed a rule which
says that the "#" punctuator cannot appear except in directives.  However,
the "#" in the middle line is not a punctuator -- it falls under the
"non-white-space character which cannot be any of the above" class of
preprocessor token.  Said rule is, of course, the reason why it cannot
be a punctuator.

Note that it is crucial that the funny non-directive be #ifdefed out,
because that preprocessing token can't be converted to a real token.
-- 
Welcome to Mars!  Your         |     Henry Spencer at U of Toronto Zoology
passport and visa, comrade?    | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list