#5519 closed Bugs (fixed)
Error C4235 in msvc_rounding_control.hpp (numeric.interval_lib.detail)
Reported by: | hajokirchhoff | Owned by: | Jürgen Hunold |
---|---|---|---|
Milestone: | To Be Determined | Component: | interval |
Version: | Boost 1.46.1 | Severity: | Problem |
Keywords: | rint numeric interval | Cc: |
Description
The code tests WIN64 when it should test _WIN64.
WIN64 is not a Microsoft standard preprocessor macro. _WIN64 is correct (see Microsoft documentation http://msdn.microsoft.com/en-us/library/b0084kay%28VS.80%29.aspx)
The effect is that the inline _asm function gets compiled when using the 64 Bit MSVC Compiler, which results in a C4235 error (_asm is not supported).
Fix: Use _WIN64 instead of WIN64 to test for 64 Bit MSVC
#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
Attachments (1)
Change History (7)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Component: | None → interval |
---|
comment:3 by , 11 years ago
The bug was created by the following revision in trunk, last year:
------------------------------------------------------------------------ r60227 | jhunold | 2010-03-06 15:17:49 +0100 (Sat, 06 Mar 2010) | 1 line Disable x86 assembler for x64 builds. ------------------------------------------------------------------------ Index: msvc_rounding_control.hpp =================================================================== --- msvc_rounding_control.hpp (revision 60226) +++ msvc_rounding_control.hpp (revision 60227) @@ -25,7 +25,7 @@ namespace interval_lib { namespace detail { -#if BOOST_MSVC < 1400 +#if BOOST_MSVC < 1400 || defined(WIN64) extern "C" { double rint(double); } #else inline double rint(double x)
WIN64 is not defined, only _WIN64 is.
comment:4 by , 11 years ago
The patch is trivially correct and trivial, please apply it as soon as possible.
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The exact location of the error is msvc_rounding_control.hpp line 28, boost 1.46.1 when compiling with Visual Studio 2008 with x64 architecture.