Opened 10 years ago
Last modified 10 years ago
#7010 new Bugs
A few 32/64 bit warning fixes
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost Development Trunk | Severity: | Cosmetic |
Keywords: | Cc: |
Description
Attachments (1)
Change History (5)
by , 10 years ago
comment:1 by , 10 years ago
Component: | None → serialization |
---|---|
Owner: | set to |
comment:2 by , 10 years ago
comment:3 by , 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 , 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
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