Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2005-06-20 03:12:09

Ralf W. Grosse-Kunstleve wrote:

> I am not sure this is related, but something bad happened recently. We the CVS
> from a few minutes ago I get:
> % cxx -std strict_ansi -msg_display_number -msg_disable 186,450,1115 -tlocal
> -DBOOST_PYTHON_SOURCE -I/net/legless/scratch1/rwgk/hot/boost
> -I/usr/local_cci/Python-2.4.1_ticker_simple/include/python2.4 -c -o
> boost/libs/python/src/converter/builtin_converters.os
> /net/legless/scratch1/rwgk/hot/boost/libs/python/src/converter/builtin_converters.cpp
> cxx: Error: /net/legless/scratch1/rwgk/hot/boost/boost/cast.hpp, line 347: #94
> the size of an array must be greater than zero
> detected during instantiation of "Target
> boost::numeric_cast<Target,Source>(Source) [with
> Target=unsigned long long, Source=long]" at line 204 of
> "/net/legless/scratch1/rwgk/hot/boost/libs/python/src/conve
> rter/builtin_converters.cpp"
> typedef bool result_must_be_numeric[result_traits::is_specialized];
> --------------------------------------------^
> cxx: Info: 1 error detected in the compilation of
> "/net/legless/scratch1/rwgk/hot/boost/libs/python/src/converter/builtin_converters.cpp".


I'm afraid this has been broken by me with a fix to
boost/config/stdlib/roguewave.hpp. When compiling in strict ansi mode, the
RW library disables support for long long types. Therefore I added the
following lines to the RW config file:

// Disable BOOST_HAS_LONG_LONG when the library has no support for it.
#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG)

The failure is caused by boost.python not checking BOOST_HAS_LONG_LONG. It
uses its own macro magic for this which relies on the value supplied by the
python config file.

Changing the tests in builtin_converters.cpp to use BOOST_HAS_LONG_LONG
instead of HAVE_LONG_LONG makes the file compile for me, but there is a
comment regarding this test which indicates that the choice was made
deliberately not to use BOOST_HAS_LONG_LONG.

I'm not sure on how to properly solve this, any ideas?


The compiler itself actually still accepts long long, but it gives a
warning for every usage of the type.

cxx: Warning: test_long_long.cpp, line 3: the type "long long" is nonstandard
   unsigned long long u = 0LL;
cxx: Warning: test_long_long.cpp, line 3: the type "long long" is nonstandard
   unsigned long long u = 0LL;

And so on and so on...

Boost list run by bdawes at, gregod at, cpdaniel at, john at