[GCC-XML] methods on structs? possible misunderstanding of templated functions...
John Morrison
jm at mak.com
Sun Nov 7 11:18:24 EST 2004
Hi;
Short Version: I am getting a "method" for a "struct" (instead of a
class) defined by the STL. Is this expected behavior (i.e., do I
misunderstand the meaning of "method" -- e.g., a templated function is
a method rather than a function)?
Longer Version, with smallest test case I can find: When I do this --
-- cut here ---
[jm at jmorrison GCCXML]$ gccxml -I/usr/include/g++-3/
-fxml=bastring.xml /usr/include/g++-3/std/bastring.h
[jm at jmorrison GCCXML]$
-- cut here ---
I get these two lines in my resultant xml file -- the first is the
"method," and the second is the context, which I take it is a struct
rather than a class (that's my confusion, and it creates uncertainty
in my mind as to how to wrap the function)...
-- cut here ---
[jm at jmorrison GCCXML]$ fgrep compare bastring.xml
<Method id="_1403" name="compare" returns="_277" static="1" context="_666"
mangled="_ZN18string_char_traitsIcE7compareEPKcS2_j" location="f29:129"
file="f29" line="129" endline="129" extern="1">
[jm at jmorrison GCCXML]$ fgrep 'id="_666"' bastring.xml
<Struct id="_666" name="string_char_traits<char>" context="_1"
mangled="18string_char_traitsIcE" location="f29:111" file="f29" line="111"
artificial="1" size="8" align="8" members="_1394 _1395 _1396 _1397 _1398
_1399 _1400 _1401 _1402 _1403 _1404 _1405 _1406 _1407 " bases=""/>
[jm at jmorrison GCCXML]$
-- cut here ---
Environment:
FC2.0
GCC-XML version 0.7.0 (from CVS)
gcc-3.3.3-7
compat-libstdc++-devel-7.3-2.96.126
Confusedly Yours,
-jm (still working on cutting down the duplicate-id problem to a
tractable example)
--
==== 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