|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2005-01-16 13:18:13
I've looked at this a little and there are a couple of issues.
The majority of these are easily fixable and I expect I will do so soon.
However
A number of places I use size_t in file write operations and I get a warning
for invalid conversion from size_to to streamsize ! streamsize is a signed
integer and size_t is not. I'm not really sure whether they are the same
size or not. So its unclear to me what the warning is suggesting that I do.
In some cases, e.g. collections, I used unsigned integer rather than size_t
on the theory that 4 g objects is one hell of a large number of objects to
be found in main memory. I was concerned about archives such as the native
binary archives having to right out a lot of zeros that would never be
needed. In retrospect this was probably a mistake given the current
prospects for 64bit machines. Also, there is the issue that changing these
at this point will require a considering backward compatibility. Not such a
big problem as it was anticipated - but one more thing to encourage
procrastination - not that its needed.
To do this, I compiled the libraries with vc 7.1 with 64 bit portability
turned on. I really only got a few messages - maybe a score - certainly not
thousands. So I may be missing something. I would be curious to know if
you are getting messages I'm not - perhaps by suppressing 64 bit portability
checking just to see what happens.
Robert Ramey
Tobias Schwinger wrote:
> Hi,
>
> when using the Boost.Serialization library with MSVC8 I get flooded by
> (about thousand lines of) warning messages due to the fact that size_t
> has been widened (and there are just very few small classes in my
> project that use serialization).
>
> It's especially annoying because warnings about truncating conversions
> are quite useful, in general (I wouldn't want to disable them
> permanently, that is).
>
> Boost.Serialization:
>
> [ collections_save_impl.hpp:36 ] "possible loss of data
> converting...". unsigned int <var> = <size_t expression>
>
> [ detail/oserializer.hpp:479 ] "possible loss of data converting..".
> int <var> = <size_t expression>
>
> - I guess there are some more but these are the ones the compiler gets
> to see in my project (that's also why I didn't post a patch).
>
> Boost.TypeTraits (used by Boost.Serialization):
>
> [ is_abstract.hpp:81 ] BOOST_STATIC_ASSERT(sizeof(expression))"
> "forcing value to bool"
>
>
> Just in case it isn't on anyone's todo-list, yet...
>
>
> Greetings,
>
> Tobias
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk