Re: new module 'fenv-exceptions-tracking-c99'

2023-10-28 Thread Bruno Haible
It's interesting to observe that the various architectures have different semantics for the floating-point exception flags in the presence of traps: * On some architectures, modifying bits in some control register does not actually raise a trap. To raise a trap, feraiseexcept() must do an

Re: new module 'fenv-exceptions-tracking-c99'

2023-10-28 Thread Bruno Haible
Oops, after enhancing a unit test, I noticed that on MSVC, the overridden feraiseexcept function does not work for FE_OVERFLOW, FE_UNDERFLOW, FE_INEXACT. This patch fixes it. The enhanced unit test will come later. 2023-10-28 Bruno Haible fenv-exceptions-tracking-c99: Fix feraiseexce

new module 'fenv-exceptions-tracking-c99'

2023-10-28 Thread Bruno Haible
This module adds the functions that deal with tracking which floating-point exceptions have occurred: feclearexcept feraiseexcept fetestexcept It not only adds the functions for old platforms, but also provides workarounds for glibc and Cygwin bugs. With this done, it is possible to fix a