[GCC-XML] 2 newbie questions about "pseudo"

John Morrison jm at mak.com
Sat May 28 10:15:01 EDT 2005


Hi;

Ah, everything is more complicated than it looks.  Geez but C++ sucks
(in terms of complexity).

On Friday 27 May 2005 04:17 pm, Brad King wrote:
> Good idea.  GCC-XML dumps the line of every declaration.  File line
> numbering starts at 1, so any declaration on line 0 must have been
> generated artificially by GCC.

While the TYPE (in this case an enumeration) is artificial...

  <Enumeration id="_5460" name="_Ios_Fmtflags" context="_2" location="f402:55" 
file="f402" line="55" artificial="1" size="32" align="32">
    <EnumValue name="_M_ios_fmtflags_end" init="65536"/>
  </Enumeration>

...it turns out the variable...

  <Variable id="_21381" name="boolalpha" type="_5460c" 
init="(std::_Ios_Fmtflags)1" context="_5776" 
mangled="_ZNSt8ios_base9boolalphaE" location="f402:214" file="f402" 
line="214" extern="1"/>

...is neither artificial nor attributed to line=0.  Its demangled name
is...

[jm at jmorrison xml]$ c++filt
_ZNSt8ios_base9boolalphaE
std::ios_base::boolalpha
[jm at jmorrison xml]$

...and my parser is not Smart Enough to avoid spitting out the
variable declaration for a filtered-out type.

Suggestions?  (Hey, keep them clean!  Google will find your responses!
:-)

Thanks again, guys,

-jm

-- 
==== John Morrison
==== MAK Technologies Inc.
==== 10 Fawcett Street, Cambridge, MA 02138
==== http://www.mak.com/
==== vox:617-876-8085 x115
==== fax:617-876-9208
==== jm at mak.com




More information about the gccxml mailing list