
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Markus Schöpflin
#if 0 #unknown_command foo #endif
It's wrong. That's not an error.
So if I understand you correctly, it should just skip over any gibberish it might encounter until the matching #endif is found?
Yes, except that it still must tokenize the block. You can still get errors in tokenization, such as: #if 0 "half-open // error #endif
Is the preprocessor allowed to issue warnings about the gibberish?
The main point about the above is that the block must be tokenized, but it should not be parsed to produce directives or scanned for macro replacement. It is theoretically allowed to issue warnings about anything--just like the rest of the compiler. Warnings are a QOI issue, though it isn't very high quality to issue warnings about code inside unused conditional compilation blocks. Regards, Paul Mensonides