You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This separates the division-by-zero check for floating-point operations from
the division-by-zero check for integers. The new division-by-zero check for
floating-point operations is off by default, and is enabled by
--float-div-by-zero-check/
The case for doing so is weak. ISO/IEC 9899:2021 (C21) and predecessors
clealy state (Sec 6.5.5 par 5) "In both operations, if the value of the
second operand is zero, the behavior is undefined."
However, Annex F (IEC 60559 floating-point arithmetic) states that
implementations that define __STDC_IEC_559__ must implement IEC 60559
division, which clearly defines the behavior when dividing floating-point
numbers by zero. This behavior can be observed on all architectures that we
support.
0 commit comments