On Fri, Jan 19, 2018 at 9:37 AM, Rodney W. Grimes <free...@pdx.rh.cn85.dnsmgr.net> wrote: > If you think in assembler it is easy to understand why this is UB, > most (all) architectures Right Logic or Arithmetic Shift only accept an > operand that is a size that can hold log2(wordsize).
This is a logical right shift by a constant larger than the width of the left operand. As a result, it would a constant zero in any emitted machine code. It is a bug in the C standard and a concession to naive, non-optimizing compilers that this is considered UB. _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"