Boost C++ Libraries: Ticket #11765: boost_1_59_0/boost/intrusive/sgtree.hpp:830: bad if test ? https://svn.boost.org/trac10/ticket/11765 <p> [boost_1_59_0/boost/intrusive/sgtree.hpp:830]: (warning) Logical conjunction always evaluates to false: new_alpha &lt; 0.5f &amp;&amp; new_alpha &gt;= 1.0f. </p> <p> Source code is </p> <blockquote> <p> if(new_alpha &lt; 0.5f &amp;&amp; new_alpha &gt;= 1.0f) return; </p> </blockquote> <p> Maybe better code </p> <blockquote> <table class="wiki"> <tr>if(new_alpha &lt; 0.5f <td> new_alpha &gt;= 1.0f) return; </td></tr></table> </blockquote> <p> Compiling with gcc flag -Wlogical-op might help find further examples of this problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11765 Trac 1.4.3 viboes Thu, 29 Oct 2015 10:38:04 GMT component changed; owner set https://svn.boost.org/trac10/ticket/11765#comment:1 https://svn.boost.org/trac10/ticket/11765#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Ion Gaztañaga</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">intrusive</span> </li> </ul> Ticket Ion Gaztañaga Fri, 30 Oct 2015 23:56:23 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11765#comment:2 https://svn.boost.org/trac10/ticket/11765#comment:2 <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> Thanks for the report. It seems that -Wlogical-op is not part of -Wall due to some false positives. Fixed in: </p> <p> <a class="ext-link" href="https://github.com/boostorg/intrusive/commit/259e4a939f3b69c79cd136d87f9f6479deb98104"><span class="icon">​</span>https://github.com/boostorg/intrusive/commit/259e4a939f3b69c79cd136d87f9f6479deb98104</a> </p> Ticket