[GCC-XML] problem with gccxml + boost
Brad King
brad.king at kitware.com
Fri Mar 19 08:42:59 EDT 2010
Jakub Zytka wrote:
> Jakub Zytka wrote:
>> gccxml-0.9.0_pre20090516-r1
>> boost-1.33.1
>>
>> sample code:
>> #include <boost/crc.hpp>
>>
>> gccxml output:
>> In file included from test1.cpp:1:
>> /usr/include/boost/crc.hpp:432: error: redefinition of 'struct
>> boost::detail::mask_uint_t<32ul>'
>> /usr/include/boost/crc.hpp:410: error: previous definition of 'struct
>> boost::detail::mask_uint_t<32ul>'
>>
>> i think the problem is that:
>> UINT_MAX > USHRT_MAX and ULONG_MAX > UINT_MAX evaluate to true, while
>> unsigned int has the same size as unsigned long (so ULONG_MAX ==
>> UINT_MAX)
>>
>> gcc-4.1.2 compiles it just fine. I haven't tried newer gcc.
> I found the cause. It was the flag -m32. With -m64 gccxml fails with
> completely other error ;)
> Note: regular gcc compiles fine with -m32
gccxml attempts to simulate the preprocessor of the target compiler,
but it cannot simulate the ABI correctly because it was built only
for one target system. In cases like this the target software
likely needs to be taught about __GCCXML__ just as any other compiler.
-Brad
More information about the gccxml
mailing list