Hi All,
I got a compilation error while compiling a library under Win64 arch
that includes the
boost/numeric/interval/msvc_rounding_control.hpp
c:\boost_1.48\include\boost/numeric/interval/detail/msvc_rounding_control.hpp(33)
: error C4235: nonstandard extension used : '_asm' keyword not
supported on this architecture
c:\boost_1.48\include\boost/numeric/interval/detail/msvc_rounding_control.hpp(33)
: error C2065: 'FLD' : undeclared identifier
c:\boost_1.48\include\boost/numeric/interval/detail/msvc_rounding_control.hpp(34)
: error C4235: nonstandard extension used : '_asm' keyword not
supported on this architecture
So I checked the code under
boost/numeric/interval/detail/msvc_rounding_control.hpp and it seems
that it does a preprocessor check against WIN64 instead of _WIN64
namespace boost {
namespace numeric {
namespace interval_lib {
namespace detail {
#if BOOST_MSVC < 1400 || defined(WIN64)
extern "C" { double rint(double); }
#else
inline double rint(double x)
{
_asm FLD [x] ;
_asm FRNDINT ;
//_asm RET ;
}
#endif
Is there any reason why do not check against _WIN64 instead of WIN64
since the boost
does always check against _WIN64? _WIN64 is also already pre-defined
as normal
MSVC definition when targeting x86_64 archs.
[roberto@roberto include]$ grep -R WIN64 *
boost/serialization/force_include.hpp:#elif ! defined(_WIN32)
&& ! defined(_WIN64)
boost/detail/win/synchronization.hpp: #if defined(_WIN64)
boost/detail/win/basic_types.hpp:# ifdef _WIN64
boost/intrusive/detail/mpl.hpp:#if defined(_MSC_EXTENSIONS)
&& !defined(__BORLAND__) && !defined(_WIN64)
boost/python/converter/builtin_converters.hpp:# if defined(_MSC_VER)
&& defined(_WIN64) && PY_VERSION_HEX < 0x03000000
boost/xpressive/xpressive_fwd.hpp:# if (defined(_WIN32) ||
defined(_WIN64) || defined(_WINCE)) \
boost/thread/win32/thread_primitives.hpp:# ifdef _WIN64
boost/regex/config.hpp:# if(defined(_WIN32) || defined(_WIN64) ||
defined(_WINCE)) \
boost/signals2/detail/lwm_win32_cs.hpp:#if defined(_WIN64)
boost/config/compiler/intel.hpp:#if (!(defined(_WIN32) ||
defined(_WIN64)) && defined(__STDC_HOSTED__) &&
(__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200)))
|| defined(__GXX_EXPERIMENTAL_CPP0X__)
boost/config/compiler/intel.hpp:#if defined(_WIN32) ||
defined(_WIN64)
boost/smart_ptr/detail/lwm_win32_cs.hpp:#if defined(_WIN64)
boost/numeric/interval/detail/msvc_rounding_control.hpp:#if
BOOST_MSVC < 1400 || defined(WIN64)