Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Non-compiled source text? Message-ID: <1990Dec16.213403.4338@zoo.toronto.edu> Organization: U of Toronto Zoology References: <2061@mountn.dec.com> Date: Sun, 16 Dec 90 21:34:03 GMT In article <2061@mountn.dec.com> minow@bolt.enet.dec.com (Martin Minow) writes: >... text between #if and #endif must >consist of "preprocessor tokens." The last item on the list of preprocessor >tokens in 3.1, is "each non-white-space character that cannot be one >of the above." You have omitted an important fine point: if ' or " occurs in such a context that it can only fall under that last item, the effect is undefined. So a compiler is entitled to reject such text. >The intent of the #if ... #endif is to "skip sections of source files >conditionally" -- this is what I'm doing. What is the real intent >of the standard? To skip sections of *source* files conditionally. There is no implication that the skipped sections can contain arbitrary trash. The C preprocessor is not a general-purpose macro processor. -- "The average pointer, statistically, |Henry Spencer at U of Toronto Zoology points somewhere in X." -Hugh Redelmeier| henry@zoo.toronto.edu utzoo!henry