[GCC-XML]extra tags needed

Brad King brad.king at kitware.com
Tue Feb 12 14:43:29 EST 2002

Hi Michael,

> Let me first say that the GCC-XML work has a lot of potential.  We are
> planning on using it on production code in the company I work for.
I don't know if this can fit into your schedule, but I'm currently working
on a nearly complete re-write.  I'm planning to finish it within 6 weeks.
The current version in CVS has a totally new output format, and it will
probably change again soon.  The old output format is excessively verbose,
and requires alot of work by the parser to do lookups.  The new format is
going to take a starting point and output the corresponding connected
subgraph of declarations in the translation unit.  This should make for
MUCH shorter output that is easier to represent after parsing.

I'd be interested in any comments you have about this, and in feedback on
the old format.

> However, the XML output lacks a few attributes that we were needing.  
> The first thing that was lacking was access information for fields in
> classes.
Okay, that is definately a bug.  The access should be included in the new
format.  I'll also see about branching from the last version of the old
format and adding your fix.  Thanks.

> The second attribute that we were lacking involves retrieving values from
> enumeration instances.  Suppose I have declared:
> enum foo_enum { ITEM1=10, ITEM2=20, ITEM3=100 };
> I want to be able to retrieve the values for ITEM1, ITEM2, and ITEM3,
> instead of assuming that the elements are 0, 1, and 2, respectively.  I have
> looked through gcc's "tree.h" and have found no way to access these values.
> Does anybody have any suggestions.
I never looked into this because the project for which I wrote GCC-XML
didn't need the values.  I'll look at trying to find a way to dump them
while I'm working on the new format.


More information about the gccxml mailing list