On NetBSD/x86_64, I see test failures in soon-to-be-added unit tests.
The cause is that fetestexcept(), which of course is meant to be
side-effect-free, clears the exception trap bits.
The bug is evident from looking at the definition of fetestexcept()
On AIX, when I force the inclusion of the fetestexcept() override, through
an added
REPLACE_FETESTEXCEPT=1
in the *.m4 files, and use a gcc-compatible compiler, I see unit test failures:
../../gltests/test-fenv-except-state-3.c:56: assertion 'fetestexcept
(FE_INVALID) == FE_INVALID' failed
This patch fixes a compilation error on FreeBSD, when I use
gl_cv_func_fesetexceptflag_in_libm=no \
gl_cv_func_fesetexceptflag_no_libm=no \
./configure
for testing the override code.
2023-11-04 Bruno Haible
fenv-exceptions-state-c99: Fix compilation error on FreeBSD.
I had made a mistake in the override code for powerpc. This patch fixes it.
2023-11-04 Bruno Haible
fenv-exceptions-trapping: Fix for powerpc* platforms.
* lib/fenv-except-trapping.c (feenableexcept, fedisableexcept)
[powerpc]: Use the correct bit mask for the trap
Two small patches:
1) On NetBSD 8.0/sparc, I see a test failure of test-fenv-except-tracking-2
regarding 'long double's. Certainly due to the software floating-point
routines.
2) The Cygwin fraiseexcept bug has been acknowledged and fixed:
Here's a doc addition, regarding a problem with MSVC, for which Gnulib
cannot provide a workaround:
2023-11-04 Bruno Haible
fenv: Document an ABI break on MSVC.
* doc/posix-headers/fenv.texi: Document why fegetround and fesetround
are seemingly broken on MSVC.
diff
> * m4/fenv-rounding.m4: New file.
Oops, there was a mistake here, and in other places as well: Everywhere where
an Autoconf macro uses $host, $host_os, or $host_cpu, it needs to first
require AC_CANONICAL_HOST. Otherwise the value of such a variable may come out
as empty.
2023-11-04
This patch improves the fenv-rounding code for MSVC:
- It works around the fact that the values of FE_UPWARD and FE_DOWNWARD
have been swapped.
- Since MSVC uses only the SSE unit and delegates no arithmetic operations
to the 387 unit (with its excess precision flaws), it's sufficient
On NetBSD 8.0/sparc64, I see a test failure of the fenv-rounding test for
'long double' operations. On this platform, 'long double' operations are
implemented by a software floating-point library. Apparently this library
code ignores the rounding direction.
This patch avoids the test failure and