On Fri, Jun 7, 2019 at 11:49 AM Thiago Macieira via Std-Discussion <std-discussion@lists.isocpp.org> wrote:
CPUs/fpUs can trap that and deliver as an exception, causing the
program to terminate, instead of delivering ±Inf. That's definitely UB.

But that's not what optimizationalists have done with UB.  A program that
either terminates or delivers infinity is different from a program where the
compiler can use a proven division by zero to silently elide any code paths
that must lead to it.  In the former case, either the program will work as the
programmer expects or it will crash on the recalcitrant platforms.  In the
latter case, the compiler will silently destroy the intent of the programmer
and produce programs with wrong behavior that might not be detected for