On Wed, Jun 05, 2019 at 05:38:18PM -0500, David Young wrote: > > (and perhaps more) - if one of those is a shift of a negative number, > > the others potentially are as well (not that shifts of negative numbers > > bother me at all if the code author understood what is happening, which > > I suspect that they did here.) > > Unfortunately, if "undefined behavior" (UB) is invoked, you simply > cannot claim to understand what is happening, because C11-compliant > compilers have a lot of leeway in what code they generate when behavior > is undefined.
...and in particular they deliberately take that leeway in knowing violation of the principle of least surprise. -- David A. Holland dholl...@netbsd.org