On Mon, Aug 27, 2001 at 06:42:28PM -0700, Mark D. Anderson wrote:
> > This may not work.
> >...
> > Some of those compilers
> > would NOT let you '#ifdef' out the version that it did not recognize
> > (perhaps thinking that '#warn' or '#warning' might be some gross typo
> > for '#else' or '#endif', I guess...).
>
> this is true; some compilers seem to require that #ifdef'd out code be syntactically
>correct.
I think that the ISO C standard requires that all the code, including
#ifdef'd out code, must consist of valid preprocessor tokens. The
preprocessor must after all look at the #ifdef'd out code to determine
where the #ifdef ends.
So, having a line start with '#' without being a valid preprocessor
directive would be a syntax error according to ISO C.
--
<Insert your favourite quote here.>
Erik Trulsson
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message