pygccxml
pygccxml copied to clipboard
__int128 and "unsigned __int128" are not fundamental types
Hello. I am using the following environment: $ uname -a Linux roman 4.10.0-30-generic #34-Ubuntu SMP Mon Jul 31 19:38:17 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a Description: Ubuntu 17.04 Release: 17.04 Codename: zesty $ castxml --version pyplusplus/hg/default castxml version 0.1-gd5934bd
CastXML project maintained and supported by Kitware (kitware.com).
clang version 3.8.1-9ubuntu1 (tags/RELEASE_381/final) Target: x86_64-pc-linux-gnu Thread model: posix
The following code was compiled: void abc(int i, ...);
castxml generated the following xml file:
<GCC_XML version="0.9.0" cvs_revision="1.139"> <Namespace id="_1" name="::" members="_2 _3 _4 _5 _6"/> <Typedef id="_2" name="__int128_t" type="_7" context="_1" location="f0:0" file="f0" line="0"/> <Typedef id="_3" name="__uint128_t" type="_8" context="_1" location="f0:0" file="f0" line="0"/> <Typedef id="_4" name="__builtin_ms_va_list" type="_9" context="_1" location="f0:0" file="f0" line="0"/> <Typedef id="_5" name="__builtin_va_list" type="_10" context="_1" location="f0:0" file="f0" line="0"/> <Function id="_6" name="abc" returns="_11" context="_1" location="f1:1" file="f1" line="1" mangled="_Z3abciz"> <Argument name="i" type="_12" location="f1:1" file="f1" line="1"/> <Ellipsis/> </Function> <FundamentalType id="_7" name="__int128" size="128" align="128"/> <FundamentalType id="_8" name="unsigned __int128" size="128" align="128"/> <PointerType id="_9" type="_13"/> <ArrayType id="_10" min="0" max="0" type="_14"/> <FundamentalType id="_11" name="void" size="0" align="8"/> <FundamentalType id="_12" name="int" size="32" align="32"/> <Struct id="_14" name="__va_list_tag" context="_1" location="f0:0" file="f0" line="0" members="_15 _16 _17 _18" size="192" align="64"/> <Field id="_15" name="gp_offset" type="_19" context="_14" access="public" offset="0"/> <Field id="_16" name="fp_offset" type="_19" context="_14" access="public" offset="32"/> <Field id="_17" name="overflow_arg_area" type="_20" context="_14" access="public" offset="64"/> <Field id="_18" name="reg_save_area" type="_20" context="_14" access="public" offset="128"/> <FundamentalType id="_19" name="unsigned int" size="32" align="32"/> <PointerType id="_20" type="_11"/> <FundamentalType id="_13" name="char" size="8" align="8"/> <File id="f0" name="<builtin>"/> <File id="f1" name="2.cpp"/> </GCC_XML>
As you can see __int128 and 'unsigned __int128' are fundamental types, while __int128_t and __uint128_t are just typedefs for them.
I think this should be fixed in cpptypes, but may be I am wrong. Did not tested the output in other environments. May be the fix is more complex.
Regards, Roman