[GCC-XML] struct variables with no type name

Brian Buesker bbuesker at qualcomm.com
Tue Nov 8 19:50:22 EST 2005


I am trying to use gccxml in combination with pyste and ran into a 
problem with the CVS version of gccxml on Fedora Core 4. I'm not sure if 
this is a problem in gcc, gccxml, or if pyste should handle it, but 
here's the situation.

Consider the following code fragment:

struct
{
  int i;
} s1;

This produces the following Struct element in the two different versions 
of gccxml and gcc I am testing:

GCC 3.4.2 + GCC-XML 0.6.0:
  <Struct id="_4" name="._0" context="_1" mangled="3._0" location="f0:2" 
file="f0" line="2" members="_16 _17 _18 _19 _20 " bases=""/>

GCC 4.0.1 + GCC_XML 0.7.0 (CVS checkout from 2005/11/08):
  <Struct id="_4" context="_1" mangled="3._0" location="f0:2" file="f0" 
line="2" artificial="1" size="96" align="32" members="_115 _116 _117 
_118 _119 " bases=""/>

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?

Thanks,
Brian




More information about the gccxml mailing list