Boost C++ Libraries: Ticket #3171: 'Conversion to int' warnings on VC++ https://svn.boost.org/trac10/ticket/3171 <p> The attached patch adds explicit static_casts to the calls to floating point functions to prevent warnings about converting floats to ints using implicit conversions. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3171 Trac 1.4.3 Jeremiah Willcock Fri, 12 Jun 2009 14:50:04 GMT attachment set https://svn.boost.org/trac10/ticket/3171 https://svn.boost.org/trac10/ticket/3171 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">float_warnings.patch</span> </li> </ul> Ticket Daniel James Fri, 12 Jun 2009 15:17:12 GMT <link>https://svn.boost.org/trac10/ticket/3171#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3171#comment:1</guid> <description> <p> That looks wrong to me - if these functions aren't returning the same type as the function they call then something is wrong. That you're getting a <code>conversion to int</code> warning is odd since <code>type1</code> should always be a floating point type. Which version of Visual C++ are you using? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Fri, 12 Jun 2009 15:23:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3171#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3171#comment:2</guid> <description> <p> I'm not using it at all -- the Boost regression tests are triggering this warning in several Boost.Graph files. One example is <a class="ext-link" href="http://tinyurl.com/mgvn4z"><span class="icon">​</span>http://tinyurl.com/mgvn4z</a> (ignore the later errors, I think they're unrelated). It looks like the only warnings here are from EVC++. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Fri, 12 Jun 2009 18:24:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3171#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3171#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/53828" title="Try to avoid float to int warning when a float function doesn't exist. ...">[53828]</a>) Try to avoid float to int warning when a float function doesn't exist. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3171" title="#3171: Bugs: 'Conversion to int' warnings on VC++ (closed: fixed)">#3171</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Mon, 22 Jun 2009 10:37:10 GMT</pubDate> <title>status, summary changed; resolution set https://svn.boost.org/trac10/ticket/3171#comment:4 https://svn.boost.org/trac10/ticket/3171#comment:4 <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> <li><strong>summary</strong> <span class="trac-field-old">Adding explicit casts to prevent conversion warnings on VC++</span> → <span class="trac-field-new">'Conversion to int' warnings on VC++</span> </li> </ul> <p> The warning is no longer appearing in the trunk results. I'll merge to the release branch soon. Thanks for the report. </p> Ticket