gcc/libstdc++-v3/include
Jonathan Wakely 2fb17d2d90 Avoid undefined shifts in ceil2 operations
For values where the result cannot be represented the shift width would
be equal to the width of the type, which is undefined. Perform two
well-defined shifts instead of one possible undefined shift.

	* include/bits/hashtable_policy.h (__clp2): Fix calculation for LLP64
	targets where sizeof(size_t) > sizeof(long). Avoid undefined shifts
	of the number of bits in the type.
	* include/std/bit (__ceil2): Avoid undefined shifts.
	* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Test values with
	the most signifiant bit set.

From-SVN: r263986
2018-08-30 16:07:35 +01:00
..
backward P0935R0 Eradicating unnecessarily explicit default constructors 2018-06-14 15:12:24 +01:00
bits Avoid undefined shifts in ceil2 operations 2018-08-30 16:07:35 +01:00
c Update copyright years. 2018-01-03 11:03:58 +01:00
c_compatibility Update copyright years. 2018-01-03 11:03:58 +01:00
c_global Remove <chrono> dependency on _GLIBCXX_USE_C99_STDINT_TR1 2018-07-26 15:01:55 +01:00
c_std Update copyright years. 2018-01-03 11:03:58 +01:00
debug Forward declare debug containers so std::pmr aliases work 2018-08-24 18:43:18 +01:00
decimal Update copyright years. 2018-01-03 11:03:58 +01:00
experimental PR libstdc++/87061 remove pmr type aliases for COW strings 2018-08-22 23:54:33 +01:00
ext Fix __gnu_cxx::_Pointer_adapter for long long arithmetic 2018-08-30 13:24:06 +01:00
parallel Update copyright years. 2018-01-03 11:03:58 +01:00
precompiled Add initial version of C++17 <memory_resource> header 2018-07-24 22:09:55 +01:00
profile Update copyright years. 2018-01-03 11:03:58 +01:00
std Avoid undefined shifts in ceil2 operations 2018-08-30 16:07:35 +01:00
tr1 Fix warning with -Wsign-compare -Wsystem-headers 2018-08-16 18:16:33 +01:00
tr2 Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.am Add <bit> and <version> to freestanding headers 2018-08-13 19:54:34 +01:00
Makefile.in Add <bit> and <version> to freestanding headers 2018-08-13 19:54:34 +01:00