[config] BOOST_NO_LONG_LONG_NUMERIC_LIMITS not detected correctly?

Sample program: ---%<--- #include <limits> #include <iostream> using namespace std; int main() { cout << numeric_limits<long long>::is_specialized << '\n'; cout << numeric_limits<unsigned long long>::is_specialized << '\n'; } --->%--- Compiling and running this on Tru64/CXX with relaxed ANSI mode gives: schoepf@area51:~/net/tmp> cxx -version V6.5-042 -O0 -std ansi -model ansi ./test_ll_limits.cpp && ./a.out 1 1 Compiling and running this on Tru64/CXX with strict ANSI mode gives: schoepf@area51:~/net/tmp> cxx -version V6.5-042 -O0 -std strict_ansi -model ansi ./test_ll_limits.cpp && ./a.out cxx: Warning: ./test_ll_limits.cpp, line 8: the type "long long" is nonstandard cout << numeric_limits<long long>::is_specialized << '\n'; ------------------------------^ cxx: Warning: ./test_ll_limits.cpp, line 9: the type "long long" is nonstandard cout << numeric_limits<unsigned long long>::is_specialized << '\n'; ---------------------------------------^ 0 0 But when running configure in libs/config with CXX="cxx -version V6.5-042 -std strict_ansi -model ansi" bash ./configure, BOOST_NO_LONG_LONG_NUMERIC_LIMITS doesn't get defined in the resulting "user.hpp". The relevant section from the log file looks like this: configure:2190: checking std::numeric_limits<long long> configure:2220: cxx -version V6.5-042 -std strict_ansi -model ansi -o conftest -I./../.. -I./../../libs/config/test -g -DBOOST_NO_CONFIG conftest.cpp -lrt -lm >&5 configure:2223: $? = 0 Why does configure think that the specializations are present? Markus

But when running configure in libs/config with CXX="cxx -version V6.5-042 -std strict_ansi -model ansi" bash ./configure, BOOST_NO_LONG_LONG_NUMERIC_LIMITS doesn't get defined in the resulting "user.hpp".
The relevant section from the log file looks like this:
configure:2190: checking std::numeric_limits<long long> configure:2220: cxx -version V6.5-042 -std strict_ansi -model ansi -o conftest -I./../.. -I./../../libs/config/test -g -DBOOST_NO_CONFIG conftest.cpp -lrt -lm >&5 configure:2223: $? = 0
Why does configure think that the specializations are present?
I don't know, I can reproduce this, but: * The Boost.Config test program when run on it's own fails as expected (libs/config/test/no_ll_limits_pass.cpp built with -std strict_ansi). * I've eyeballed the configure.in again, and everything looks correct. So, I'm stumped at present. John.

John Maddock wrote:
Why does configure think that the specializations are present?
I don't know, I can reproduce this, but:
* The Boost.Config test program when run on it's own fails as expected (libs/config/test/no_ll_limits_pass.cpp built with -std strict_ansi). * I've eyeballed the configure.in again, and everything looks correct.
Hmm, seems the other way round. Is this how it should be? ~/net/src/boost/boost-HEAD/libs/config> cxx -version V6.5-042 -std strict_ansi -model ansi -o conftest -I./../.. -I./../../libs/config/test -g -DBOOST_NO_CONFIG test/no_ll_limits_pass.cpp -lrt -lm schoepf@area51:~/net/src/boost/boost-HEAD/libs/config> ./conftest ; echo $? 0 ~/net/src/boost/boost-HEAD/libs/config> cxx -version V6.5-042 -std strict_ansi -model ansi -o conftest -I./../.. -I./../../libs/config/test -g -DBOOST_NO_CONFIG test/no_ll_limits_fail.cpp -lrt -lm cxx: Warning: test/boost_no_ll_limits.ipp, line 22: the type "long long" is nonstandard typedef long long llt; ----------------^ cxx: Warning: test/boost_no_ll_limits.ipp, line 26: the type "long long" is nonstandard typedef unsigned long long ullt; -------------------------^ cxx: Warning: test/boost_no_ll_limits.ipp, line 28: statement is unreachable if(0 == std::numeric_limits<ullt>::is_specialized) return -1; ---^ cxx: Warning: test/boost_no_ll_limits.ipp, line 29: statement is unreachable return 0; ---^ schoepf@area51:~/net/src/boost/boost-HEAD/libs/config> ./conftest ; echo $? 255 Markus

Hmm, seems the other way round. Is this how it should be?
Ah! I think I have an idea what's going on here: even with BOOST_NO_CONFIG defined some options get defined in suffix.hpp; for example if there's no long long then there's no numeric_limits<long long> either, and this is messing up the configure script logic, I believe the configure script is now fixed in cvs. John.

John Maddock wrote:
Ah! I think I have an idea what's going on here: even with BOOST_NO_CONFIG defined some options get defined in suffix.hpp; for example if there's no long long then there's no numeric_limits<long long> either, and this is messing up the configure script logic, I believe the configure script is now fixed in cvs.
Works now. Thanks for the help. Markus
participants (2)
-
John Maddock
-
Markus Schöpflin