Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2005-12-20 03:39:45

> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] 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

> 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.

Paul Mensonides

Boost list run by bdawes at, gregod at, cpdaniel at, john at