Boost C++ Libraries: Ticket #3566: GCC 4.2 compiler warning in in basic_binary_oarchive.hpp:88 https://svn.boost.org/trac10/ticket/3566 <p> Compiling our project with boost 1.40 on GCC 4.2 on OSX Snow Leopard with Xcode for x86_64 in debug mode produces the following warning for each of the translation units: </p> <p> /opt/local/include/boost/archive/basic_binary_oarchive.hpp:88: warning: comparison between signed and unsigned integer expressions </p> <p> This is the affected code (an assert): </p> <blockquote> <p> void save_override(const class_id_reference_type &amp; t, int){ </p> <blockquote> <p> <em> upto 32K classes assert(t.t &lt;= boost::integer_traits&lt;boost::uint_least32_t&gt;::const_max); const boost::uint_least16_t x = t.t; </em></p> </blockquote> </blockquote> <ul><li>this-&gt;This() &lt;&lt; x; </li></ul><blockquote> <p> } </p> </blockquote> <p> Since the line where the error appears is the last line of the main function I suspect the problem is somehow triggered by destructor code. </p> <p> However as the template code error message is so unspecific and I am not familiar with the internals of the serialization implementation in boost, it is difficult for me to pinpoint what code using basic_binary_oarchive.hpp implicitly is causing this. There are several places where I have included binary_oarchive.hpp to enable serialization support for classes, but I cant track it down further. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3566 Trac 1.4.3 Robert Ramey Fri, 06 Nov 2009 16:27:42 GMT status, type, severity changed; resolution set https://svn.boost.org/trac10/ticket/3566#comment:1 https://svn.boost.org/trac10/ticket/3566#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Cosmetic</span> </li> </ul> <p> fixed on 1.41 </p> Ticket