I believe the exact behavior of shifts is implementation-defined when the right operand is >= the size in bits of the left operand.
GCC in particular applies a modulo on it, such that for E1<<E2, E2 being >=sizeof(E1)*8, E2%=sizeof(E1)*8. Therefore, x<<32==x<<0, x<<33==x<<1, and so on. This can be verified because 0x8000000<<1!=1.
The operands shall be of integral or enumeration type and integral promotions are performed. The type of the result is that of the promoted left operand. The behavior is undefined if the right operand is negative, or greater than or equal to the length in bits of the promoted left operand.
2 The value of E1 << E2 is E1 (interpreted as a bit pattern) left-shifted E2 bit positions; vacated bits are
zero-filled. If E1 has an unsigned type, the value of the result is E1 multiplied by the quantity 2 raised to
the power E2, reduced modulo ULONG_MAX+1 if E1 has type unsigned long, UINT_MAX+1 otherwise.
[Note: the constants ULONG_MAX and UINT_MAX are defined in the header <climits>). ]
3 The value of E1 >> E2 is E1 right-shifted E2 bit positions. If E1 has an unsigned type or if E1 has a
signed type and a nonnegative value, the value of the result is the integral part of the quotient of E1 divided
by the quantity 2 raised to the power E2. If E1 has a signed type and a negative value, the resulting value
is implementation-defined.
As Grey Wolf referenced, when overflowed, the behavior is undefined. However, it behaves as helios said.
My cowokers told me that there would be a modulo on the right opeand by CPU when it overflowed, but none of us found the definition of such operation of CPU...