[GCC-XML] struct variables with no type name

Brad King brad.king at kitware.com
Wed Nov 9 09:52:47 EST 2005


Brian Buesker wrote:
> The problem I ran into is that the current version of pyste expects the 
> Struct element to have a 'name' attribute, which the latest version of 
> gccxml coupled with GCC 4.0.1 does not include. Is this attribute 
> intentionally left off in the newest version and Pyste should be able to 
> handle this, or should that attribute be there with a generated name?

The name is left off on purpose in the new gccxml version.  In the dump 
code for structs the following code appears:

   if(!TYPE_ANONYMOUS_P (rt))
     {
     xml_print_name_attribute (xdi, DECL_NAME (TYPE_NAME (rt)));
     }

The idea is not to give the Struct element a name attribute if the 
struct is anonymous.  Pyste should be updated to handle this.  If it 
needs a unique identifier for the Struct it can use the mangled 
attribute or the xml id attribute which is always unique in the xml 
document.

-Brad



More information about the gccxml mailing list