Opened 13 years ago

Closed 13 years ago

#3566 closed Feature Requests (fixed)

GCC 4.2 compiler warning in in basic_binary_oarchive.hpp:88

Reported by: Thomas T. <boost-trac@…> Owned by: Robert Ramey
Milestone: Boost 1.41.0 Component: serialization
Version: Boost 1.40.0 Severity: Cosmetic
Keywords: Cc: boost-trac@…

Description

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:

/opt/local/include/boost/archive/basic_binary_oarchive.hpp:88: warning: comparison between signed and unsigned integer expressions

This is the affected code (an assert):

void save_override(const class_id_reference_type & t, int){

upto 32K classes assert(t.t <= boost::integer_traits<boost::uint_least32_t>::const_max); const boost::uint_least16_t x = t.t;

  • this->This() << x;

}

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.

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.

Change History (1)

comment:1 by Robert Ramey, 13 years ago

Resolution: fixed
Severity: ProblemCosmetic
Status: newclosed
Type: BugsFeature Requests

fixed on 1.41

Note: See TracTickets for help on using tickets.