#ifdef
Azeem Kahn
azeemk at microsoft.UUCP
Wed Dec 6 10:58:01 AEST 1989
This question deals with the implementation of #ifdef.
Consider the following:
#define VAR
#ifdef VAR
...
...
#else
/*
#endif
*/
#endif
VAR is defined and hence the #else is the inactive segment. Now
should the preprocessor match the #else with the first or the
second #endif? In other words, does the preprocessor have to look
at the lines in the inactive segment for comments, unclosed qoutes
etc. OR should it disregard everything in the inactive segment and
just keep looking for a matching #endif to satisfy the nesting.
I want to know what the standard says about this. I am not interested
in what some systems do and others don't.
Thanks for any info.
-azeem.
More information about the Comp.std.c
mailing list