Boost C++ Libraries: Ticket #5519: Error C4235 in msvc_rounding_control.hpp (numeric.interval_lib.detail) https://svn.boost.org/trac10/ticket/5519 <p> The code tests WIN64 when it should test _WIN64. </p> <p> WIN64 is not a Microsoft standard preprocessor macro. _WIN64 is correct (see Microsoft documentation <a class="ext-link" href="http://msdn.microsoft.com/en-us/library/b0084kay%28VS.80%29.aspx"><span class="icon">​</span>http://msdn.microsoft.com/en-us/library/b0084kay%28VS.80%29.aspx</a>) </p> <p> 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). </p> <p> Fix: Use _WIN64 instead of WIN64 to test for 64 Bit MSVC </p> <pre class="wiki">#if BOOST_MSVC &lt; 1400 || defined(WIN64) extern "C" { double rint(double); } #else inline double rint(double x) { _asm FLD [x] ; _asm FRNDINT ; //_asm RET ; } #endif </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5519 Trac 1.4.3 hajokirchhoff Thu, 05 May 2011 07:33:57 GMT <link>https://svn.boost.org/trac10/ticket/5519#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5519#comment:1</guid> <description> <p> 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. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Sun, 16 Oct 2011 18:35:45 GMT</pubDate> <title>component changed https://svn.boost.org/trac10/ticket/5519#comment:2 https://svn.boost.org/trac10/ticket/5519#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">interval</span> </li> </ul> Ticket anonymous Mon, 30 Jan 2012 09:19:24 GMT attachment set https://svn.boost.org/trac10/ticket/5519 https://svn.boost.org/trac10/ticket/5519 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">msvc_rounding_control.hpp.diff</span> </li> </ul> <p> Trivial fix </p> Ticket Laurent.Rineau__CGAL@… Mon, 30 Jan 2012 10:11:12 GMT <link>https://svn.boost.org/trac10/ticket/5519#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5519#comment:3</guid> <description> <p> The bug was created by the following revision in trunk, last year: </p> <pre class="wiki">------------------------------------------------------------------------ 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 &lt; 1400 +#if BOOST_MSVC &lt; 1400 || defined(WIN64) extern "C" { double rint(double); } #else inline double rint(double x) </pre><p> WIN64 is not defined, only _WIN64 is. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>wilx</dc:creator> <pubDate>Tue, 28 Feb 2012 10:50:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5519#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5519#comment:4</guid> <description> <p> The patch is trivially correct and trivial, please apply it as soon as possible. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jürgen Hunold</dc:creator> <pubDate>Wed, 29 Feb 2012 20:49:54 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5519#comment:5 https://svn.boost.org/trac10/ticket/5519#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/77144" title="Fix #5519: Use correct predefined _WIN64 ">[77144]</a>) Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5519" title="#5519: Bugs: Error C4235 in msvc_rounding_control.hpp (numeric.interval_lib.detail) (closed: fixed)">#5519</a>: Use correct predefined _WIN64 </p> Ticket Jürgen Hunold Sun, 04 Mar 2012 10:45:14 GMT <link>https://svn.boost.org/trac10/ticket/5519#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5519#comment:6</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/77205" title="Merge 77144 from ^/trunk ...">[77205]</a>) Merge 77144 from <sup>/trunk </sup></p> <blockquote> <p> ------------------------------------------------------------------------ <a class="changeset" href="https://svn.boost.org/trac10/changeset/77144" title="Fix #5519: Use correct predefined _WIN64 ">r77144</a> | jhunold | 2012-02-29 21:49:52 +0100 (Mi, 29 Feb 2012) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5519" title="#5519: Bugs: Error C4235 in msvc_rounding_control.hpp (numeric.interval_lib.detail) (closed: fixed)">#5519</a>: Use correct predefined _WIN64 </p> </blockquote> <p> </p> <blockquote> <p> ------------------------------------------------------------------------ </p> </blockquote> </description> <category>Ticket</category> </item> </channel> </rss>