On Fri, Jul 31, 2015, 3:21 PM Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
Do you have a reference to the relevant standard ? Where can it be undefined ?
C99 standard:
The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits are filled with zeros. If E1 has an unsigned type, the value of the result is E1×2E2, reduced modulo one more than the maximum value representable in the result type. If E1 has a signed type and non-negative value, and E1×2E2 is representable in the result type, then that is the resulting value; otherwise, the behaviour is undefined.