[PATCH] Avoid undefined behaviour in std::byte operators (LWG 2950)

Jonathan Wakely jwakely@redhat.com
Tue Jun 18 11:41:00 GMT 2019


On 18/06/19 12:39 +0100, Jonathan Wakely wrote:
>	* include/c_global/cstddef (std::byte): Perform arithmetic operations
>	in unsigned int to avoid promotion (LWG 2950).
>
>Tested x86_64-linux, committed to trunk.

I don't see any great need to backport this, because I don't think the
compiler or UBSan cares that the old definitions were technically
undefined.



More information about the Gcc-patches mailing list