r273705 - in /trunk/libstdc++-v3: ChangeLog inc...

redi@gcc.gnu.org redi@gcc.gnu.org
Mon Jul 22 16:53:00 GMT 2019


Author: redi
Date: Mon Jul 22 16:53:27 2019
New Revision: 273705

URL: https://gcc.gnu.org/viewcvs?rev=273705&root=gcc&view=rev
Log:
Change std::ceil2 to be undefined if the result can't be represented

	* include/std/bit (__ceil2): Make unrepresentable results undefined,
	as per P1355R2. Add debug assertion. Perform one left shift, not two,
	so that out of range values cause undefined behaviour. Ensure that
	shift will still be undefined if left operand is promoted.
	* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
	unrepresentable values with checks that they are not core constant
	expressions.
	* testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.

Added:
    trunk/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/bit
    trunk/libstdc++-v3/testsuite/26_numerics/bit/bit.pow.two/ceil2.cc



More information about the Libstdc++-cvs mailing list