This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Can CPP process only one "conditional" ?
- From: "Young, Michael" <Michael dot Young at paetec dot com>
- To: "adlv" <amaury dot delavaissiere at inria dot fr>, <gcc-help at gcc dot gnu dot org>
- Date: Wed, 11 Jun 2008 10:40:46 -0400
- Subject: RE: Can CPP process only one "conditional" ?
> Doxygen's preprocessor is a very good candidate, as it seems to be
doing exactly what I want with the tag EXPAND_ONLY_PREDEF.
> More info here :
http://www.stack.nl/~dimitri/doxygen/preprocessing.html
>
> That solves my question, although I would be curious to know if CPP
can do the equivalent of doxygen.
I don't believe this functionality is available as part of a standard
CPP (i.e., it's not a requirement of the standard), and I don't recall
any similar functionality in the actual implementations I've used. (Of
course, I could be wrong - I wasn't explicitly looking for this
particular behavior.)
However, you might want to check out Wave
(http://spirit.sourceforge.net/old_docs/wave_v1_0/index.html) - it's a
CPP based on the Boost Spirit parser. I looked at it awhile back for a
project - it's fairly capable; I don't know if it has what you want out
of the box, but you can always modify it. :-)
- Mike