From: Bruno Haible Date: Wed, 1 Nov 2023 01:10:11 +0000 (+0100) Subject: manual: Clarify undefined behavior of feenableexcept (BZ 31019) X-Git-Tag: glibc-2.39~184 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e55599e0286655dd5f1f5b48005a17be37cc7f2c;p=thirdparty%2Fglibc.git manual: Clarify undefined behavior of feenableexcept (BZ 31019) Explain undefined behavior of feenableexcept in a special case. Reviewed-by: Carlos O'Donell --- diff --git a/manual/arith.texi b/manual/arith.texi index fa7110e9923..be24c20493c 100644 --- a/manual/arith.texi +++ b/manual/arith.texi @@ -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})