On 12/30/22 21:56, Joseph Myers wrote: > 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. Ahhh, right, I forgot that detail. Yep, I need to special-case then. Thanks! --