]> sourceware.org Git - glibc.git/commitdiff
manual: Clarify undefined behavior of feenableexcept (BZ 31019)
authorBruno Haible <bruno@clisp.org>
Wed, 1 Nov 2023 01:10:11 +0000 (02:10 +0100)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 19 Dec 2023 18:12:38 +0000 (15:12 -0300)
Explain undefined behavior of feenableexcept in a special case.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
manual/arith.texi

index fa7110e992338ebd4cb001413f5b294f501de4e8..be24c20493c70cd903977258dbca04e4495ec575 100644 (file)
@@ -1176,6 +1176,12 @@ enabled, the status of the other exceptions is not changed.
 
 The function returns the previous enabled exceptions in case the
 operation was successful, @code{-1} otherwise.
+
+Note: Enabling traps for an exception for which the exception flag is
+currently already set (@pxref{Status bit operations}) has unspecified
+consequences: it may or may not trigger a trap immediately.
+@c It triggers a trap immediately on powerpc*, at the next floating-
+@c instruction on i386, and not at all on the other CPUs.
 @end deftypefun
 
 @deftypefun int fedisableexcept (int @var{excepts})
This page took 0.045752 seconds and 5 git commands to generate.