id summary reporter owner description type status milestone component version severity resolution keywords cc 9925 operators_test.cpp test_left_shiftable is failing due to invalid parameters chris.cooper@… No-Maintainer "In libs/utility/operators_test.cpp, test_left_shiftable is checking whether one random value shifted by a second random value, is the same whether called directly or via the Wrapper2<> and Wrapper1<> template classes. However, according to C++ ISO specification (INCITS/ISO/IEC 14882-2011\[2012\]), section 5.8.2 (which I don't have, but is referenced at http: / / msdn.microsoft.com/en-us/library/336xbhcz.aspx), left-shifting a signed value has undefined behavior (which is much more unpleasant than implementation-defined behavior) if the result doesn't fit in an unsigned value of the same size. With the clang compiler that comes with Xcode 5.1 (""Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)""), the results of such left-shifts are seemingly random - this code: {{{ long b1 = 48271; int s = 1291394886; std::cout << (b1 << s) << std::endl; std::cout << (b1 << s)<< std::endl; std::cout << (b1 << s)<< std::endl; }}} prints three different numbers." Bugs new To Be Determined utility Boost 1.54.0 Problem