[GCC-XML] feature request: preprocessor output

Brad King brad.king at kitware.com
Thu Mar 27 09:23:20 EDT 2008


Francesco Montorsi wrote:
> Specifically, for what I'm developing I need to know only #defined
> values, not #defined macros. So I guess I'll grep the sources for
> "#define" and then parse the results...

In that case, try running

  gccxml -E -dM input.cxx

to get the list of preprocessor definitions in effect throughout the
translation unit.  You can get them inline with the preprocessed output
using

  gccxml -E -dD input.cxx

-Brad



More information about the gccxml mailing list