[C++-sig] Re: Boost::Python 1.13.1 on SuSE 9.1 x86_64

David Abrahams dave at boost-consulting.com
Thu Aug 5 18:55:31 CEST 2004


Jan Heiser <jan.heiser at raubtierbaendiger.de> writes:

> David Abrahams wrote:
>
>> Jan Heiser <jan.heiser at raubtierbaendiger.de> writes:
>> 
>>> It boils down to the fact that on x86_64 unsigned and std::size_t do not
>>> have the same width, unsigned still has 32 bits, std::size_t has 64 bits.
>>>
>>>
>>> Now, my idea was to directly change the template function:
>>>
>>> boost/python/with_custodian_and_ward.hpp:79
>>> - template <std::size_t custodian, std::size_t ward, class BasePolicy_ =
>>> default_call_policies>
>>> + template <unsigned custodian, unsigned ward, class BasePolicy_ =
>>> default_call_policies>
>> 
>> I wouldn't want to make that change.  I'd much rather use a
>> std::size_t for the arity variable at the line of the warning.  But
>> either way, this warning is obviously completely bogus.  A size_t can
>> never be greater than an unsigned int??!
>
> Changing the type of arity works. You're right, this is probably better. Any
> chance this will be put into CVS so it'll be part of the next release?
>
>> My advice: turn off -Wall and/or -Werror.
>
> For the project Boost::python is used in, it is important that -Wall -Werror
> is turned on. After it was introduced, quite a number of bugs directly
> showed up.

If you agree to report the bug to the GCC maintainers, I'll happily
apply the patch.

Caveat: I can by no means guarantee that GCC won't emit other silly
warnings for Boost.Python code.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com




More information about the Cplusplus-sig mailing list