C++ Parser and gcc internal defines

Gunther Piez gpiez at web.de
Sat May 29 00:55:35 BST 2010

On Friday 28 May 2010 21:28:56 Esben Mose Hansen wrote:
> > which  looks like "g++ -E -P -v ${COMPILE_FLAGS} empty.c" on an empty
> Hm, that gives me the flags used, but no the defines.
Sorry, I missed a -dD.
> g++ -E -dM ${COMPILE_FLAGS} empty.c
> does give me most of the predefined macros, with notable exceptions of
> (from memory)
> __FUNC__
> __LINE__
> __FILE__
> __func__

> I'm not sure kdevelop needs to be able to actually expand these at first 
> try; merely making them mesh with the type system might be enough at first.

These are special macros which depend on the current state of the 
preprocessor. It makes no sense to predefine them. IMHO it would be sufficient 
to expand them always to an empty but defined macro.

- Gunther

More information about the KDevelop mailing list