On Thu, Jul 4, 2019 at 7:11 AM Henri Sivonen <hsivo...@mozilla.com> wrote: > > Do you happen to know why? Is this due to worries about underflow or > > odd behavior on subtraction or something? > > I don't _know_, but most like they want to benefit from optimizations > based on overflow being UB.
My understanding is yes, that's one of the motivations. Another, as hinted at in Gerald's quote, is that tools like UBSan can diagnose and catch signed overflow because it's undefined behaviour. They can't really do that for unsigned overflow because, since that's defined to wrap, for all the tool knows the code author intended for the overflow and wrapping to occur. Cheers, Botond _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform