stdc_bit_ceil(3) and wrapping
Joseph Myers
joseph@codesourcery.com
Fri Dec 30 20:56:53 GMT 2022
On Fri, 30 Dec 2022, Alejandro Colomar via Gcc wrote:
> For the C standard, shifts have wrap around semantics for unsigned types:
Only if the shift count is nonnegative and strictly less than the width of
the type. This is about shifting by an amount equal to the width of the
type, which has undefined behavior.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list