On Thu, 2013-01-24 at 00:26 +0000, Steve Huston wrote: > The following warning is currently seen when building C++ Qpid in Release > mode on Windows (all of Visual Studio 2012, 2010, 2008): > > Compiling... > Variant.cpp > > ..\..\qpid\cpp\src\qpid\types\Variant.cpp(125) : warning C4146: unary minus > operator applied to unsigned type, result still unsigned > > ..\..\qpid\cpp\src\qpid\types\Variant.cpp(328) : see reference to > function template instantiation 'T > qpid::types::VariantImpl::convertFromString<uint32_t>(void) const' being > compiled > with > [ > T=uint32_t > ] > > There's a similar warning for uint64_t. > > The warning is not issued when compiled in Debug mode. The code runs > correctly in both modes. This appears to be a problem with Visual Studio C++ > - I reported it to Microsoft. > > FYI...
This is due to a recent bug fix. The compiler should be able to tell that branch of the if can never happen because of a compile time constant (in other words that unary minus can only happen if the type is signed). Andrew --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
