[GCC-XML] GCC XML fails to compile standard library headers like <new>

Brad King brad.king at kitware.com
Fri Aug 7 08:30:33 EDT 2009

Brad King wrote:
>> I am working in a tool, which does the backword binary compatibility
>> check for s60 headers. The tool uses the GCC XML compiler
>> (gccxml_cc1plus.exe) to parse the headers and generate a xml file with
>> all dependent headers. And with these xml files of two s60 headers, we
>> check the binary compatibility.
> Nice.  That sounds like a really cool project.

Before you go too much further with this approach, please be aware
of the following.  As I explained in the previous response, GCC-XML
simulates the preprocessor of other compilers and then describes
the *interface* of a project (API).  The interface is composed of
the types, struct/class-es, functions, etc. as described in C++.

Any *implementation* details of the interface (ABI), such as those
important to binary compatibility like size and alignment of data,
are not accurately represented in the output.  The values placed
in the xml files are those as *GCC* would compile for the *host*
platform.  There is no attempt to simulate cross-compiled target

If all you're doing is comparing the structure layouts to ensure
they are identical, that should be okay because the real s60
compiler will lay out identical implementations.  However, you
cannot depend on the size and alignment information in the xml.


More information about the gccxml mailing list