[GCC-XML] Bug, or is it me?

Tony Whitley tony.whitley at vodafone.net
Mon Jul 3 11:19:39 EDT 2006


Apologies, I'm an occasional user of gccxml rather than an expert and I
don't understand what's happening here.


I have a struct which has a pointer to another struct, like this:

typedef struct
{
  int one;
} referred_struct;

typedef struct
{
  int two;
} pointed_to_struct;

typedef struct
{
  referred_struct    referred;
  pointed_to_struct *pointer_to_struct;
} referring_struct;

referring_struct all;



If I run gccxml with
    -fxml-start=all
I get output (below) that includes a reference to "pointed_to_struct" but 
none of its contents: "one" is present in the XML but not "two"

GCC-XML version 0.6.0

<?xml version="1.0"?>
<GCC_XML>
  <Variable id="_1" name="all" type="_2" context="_3" location="f0:17" 
file="f0" line="17"/>
  <Struct id="_2" name="referring_struct" context="_3" 
mangled="16referring_struct" location="f0:15" file="f0" line="15" 
members="_4 _5 _6 _7 " bases=""/>
  <Field id="_4" name="referred" type="_8" context="_2" 
mangled="_ZN16referring_struct8referredE" location="f0:13" file="f0" 
line="13"/>
  <Field id="_5" name="pointer_to_struct" type="_9" context="_2" 
mangled="_ZN16referring_struct17pointer_to_structE" location="f0:14" 
file="f0" line="14"/>
  <Constructor id="_6" name="$_2" artificial="1" throw="" context="_2" 
mangled="_ZN16referring_structC1ERKS_ *INTERNAL* " location="f0:12" 
file="f0" line="12">
    <Argument name="_ctor_arg" type="_10"/>
  </Constructor>
  <Constructor id="_7" name="$_2" artificial="1" throw="" context="_2" 
mangled="_ZN16referring_structC1Ev *INTERNAL* " location="f0:12" file="f0" 
line="12"/>
  <Struct id="_8" name="referred_struct" context="_3" 
mangled="15referred_struct" location="f0:4" file="f0" line="4" members="_11 
_12 _13 " bases=""/>
  <PointerType id="_9" type="_14"/>
  <ReferenceType id="_10" type="_2c"/>
  <Field id="_11" name="one" type="_16" context="_8" 
mangled="_ZN15referred_struct3oneE" location="f0:3" file="f0" line="3"/>
  <Constructor id="_12" name="$_0" artificial="1" throw="" context="_8" 
mangled="_ZN15referred_structC1ERKS_ *INTERNAL* " location="f0:2" file="f0" 
line="2">
    <Argument name="_ctor_arg" type="_17"/>
  </Constructor>
  <Constructor id="_13" name="$_0" artificial="1" throw="" context="_8" 
mangled="_ZN15referred_structC1Ev *INTERNAL* " location="f0:2" file="f0" 
line="2"/>
  <FundamentalType id="_16" name="int"/>
  <ReferenceType id="_17" type="_8c"/>
  <Namespace id="_3" name="::" mangled="_Z2::"/>
  <CvQualifiedType id="_8c" type="_8" const="1"/>
  <Struct id="_14" name="pointed_to_struct" context="_3" 
mangled="17pointed_to_struct" location="f0:9" file="f0" line="9"/>
  <CvQualifiedType id="_2c" type="_2" const="1"/>
  <File id="f0" name="test.c"/>
</GCC_XML>




More information about the gccxml mailing list