Annex F (informative) Core undefined behavior [ub]

F.3 [expr]: Expressions [ub.expr]

F.3.33[ub:expr.shift.neg.and.width]
Specified in: [expr.shift]

Shifting by a negative amount or equal or greater than the bit-width of a type has undefined behavior.
[Example 1: int y = 1 << -1; // undefined behavior, shift is negative static_assert(sizeof(int) == 4 && CHAR_BIT == 8); int y1 = 1 << 32; // undefined behavior, shift is equal to the bit width of int int y2 = 1 >> 32; // undefined behavior, shift is equal to the bit width of int — end example]