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

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The C90/C99 difference is due to ubsan_instrument_shift:

193   /* For signed x << y, in C99 and later, the following:
194      (unsigned) x >> (uprecm1 - y)
195      if non-zero, is undefined.  */
196   else if (code == LSHIFT_EXPR && flag_isoc99 && cxx_dialect < cxx11)
197     {
198       tree x = fold_build2 (MINUS_EXPR, op1_utype, uprecm1,
199                             fold_convert (op1_utype, unshare_expr (op1)));

Reply via email to