[GCC-XML] (no subject)

Brad King brad.king at kitware.com
Thu Sep 8 13:11:51 EDT 2005


Bjørn Roald wrote:
> I was just thinking...  could you use the MS preprocessor on the source 
> files and possibly massage the output before you put it into GCC-XML.  
> This way the #pragma once may be treated correctly.
> 
> I may remenber wrong, but I think the /E option for the MS compilers 
> produce preprocessed output only. Look it up in the command line docs.

I've considered using the native compiler's preprocessor in the past but 
determined that it will not work.  Not all compilers have simple ways of 
executing their preprocessors (Borland C++ comes to mind).  In the case 
of msvc7, GCC-XML can actually simulate it without having "cl" in the 
path because it uses registry entries to get the needed information. 
Running the native preprocessor would require the compiler to be in the 
path.  Finally, GCC cannot actually parse the results that come from 
preprocessing the native compiler's headers directly.  It must use its 
own patched copies of many native headers which would not be used if the 
native preprocessor were running.

-Brad



More information about the gccxml mailing list