Opened 10 years ago

Last modified 10 years ago

#7010 new Bugs

A few 32/64 bit warning fixes

Reported by: Luke Elliott <lukester_null@…> Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost Development Trunk Severity: Cosmetic
Keywords: Cc:

Description

if of any interest. Mainly (only?) SunStudio, if memory serves.

Regards

Luke Elliott.

Attachments (1)

ser.patch (3.5 KB ) - added by Luke Elliott <lukester_null@…> 10 years ago.

Download all attachments as: .zip

Change History (5)

by Luke Elliott <lukester_null@…>, 10 years ago

Attachment: ser.patch added

comment:1 by lukester_null@…, 10 years ago

Component: Noneserialization
Owner: set to Robert Ramey

comment:2 by anonymous, 10 years ago

hmmm - the sun compiler fails the trunk test suite. Since you're using this and the serialization library, maybe you could run the serialization library tests on your system and track down the cause of these failures. I suspect it's just a standard io library quirk but there's nothing I can do about it on my own. I believe that a little sleuthing would be rewarded with a couple of changes which would result if the sun compiler passing (almost) all tests.

Robert Ramey

comment:3 by lukester_null@…, 10 years ago

Actually looking at it again, looks like it would throw up some warnings with VC++ and it does indeed:

basic_iarchive.cpp
..\..\..\libs\serialization\src\basic_iarchive.cpp(345) : warning C4267: 'argument' : conversion from 'size_t' to 'const unsigned int', possible loss of data
..\..\..\libs\serialization\src\basic_iarchive.cpp(380) : warning C4267: 'argument' : conversion from 'size_t' to 'const unsigned int', possible loss of data
..\..\..\libs\serialization\src\basic_iarchive.cpp(391) : warning C4267: 'argument' : conversion from 'size_t' to 'const unsigned int', possible loss of data
..\..\..\libs\serialization\src\basic_iarchive.cpp(470) : warning C4267: 'initializing' : conversion from 'size_t' to 'const unsigned int', possible loss of data
compile-c-c++ ..\..\..\bin.v2\libs\serialization\build\msvc-9.0\debug\address-model-64\threading-multi\basic_iserializer.obj
basic_iserializer.cpp
compile-c-c++ ..\..\..\bin.v2\libs\serialization\build\msvc-9.0\debug\address-model-64\threading-multi\basic_oarchive.obj
basic_oarchive.cpp
..\..\..\libs\serialization\src\basic_oarchive.cpp(279) : warning C4267: 'argument' : conversion from 'size_t' to 'const unsigned int', possible loss of data
..\..\..\libs\serialization\src\basic_oarchive.cpp(367) : warning C4267: 'argument' : conversion from 'size_t' to 'const unsigned int', possible loss of data
compile-c-c++ ..\..\..\bin.v2\libs\serialization\build\msvc-9.0\debug\address-model-64\threading-multi\basic_oserializer.obj
basic_oserializer.cpp

... and so on.

It also throws up a bench of warnings about unsafe functions. I normally don't see those as _SCL_SECURE_NO_WARNINGS and _CRT_SECURE_NO_DEPRECATE get set in my build environment (not via bjam).

So sorry about the confusion there. This was a patch I've been applying against boost for some time and I thought it was about time I mentioned it - but sadly forgot where it was generating the warnings in the first place!

If I get some time I'll have a look with SunStudio but hopefully the VC++ warnings can be removed in the meantime?

Best regards

Luke Elliott.

comment:4 by Robert Ramey, 10 years ago

FYI, this is not so easy as it seems.

it presumes that the underlying type of object_id_type is unsigned int.

But in fact, it is uint_least32_t which may or may not be the same type as unsigned int.

I'm still looking into this.

Robert Ramey

Note: See TracTickets for help on using tickets.