https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66828

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Well, gcc is a C++ project so the C99 standard doesn't apply.

The C++ standard says:

5.8.2:

The value of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits are
zero-filled. 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. Otherwise, if E1 has a signed type and non-negative value, and E1 × 2E2
is representable in the corresponding unsigned type of the result type, then
that value, converted to the result type, is the resulting value; otherwise,
the
behavior is undefined.

Reply via email to