This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]