public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/31019] New: The documentation of feenableexcept is incomplete
@ 2023-11-01  1:29 bruno at clisp dot org
  2023-11-01  1:30 ` [Bug manual/31019] " bruno at clisp dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bruno at clisp dot org @ 2023-11-01  1:29 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31019

            Bug ID: 31019
           Summary: The documentation of feenableexcept is incomplete
           Product: glibc
           Version: 2.35
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: manual
          Assignee: unassigned at sourceware dot org
          Reporter: bruno at clisp dot org
                CC: mtk.manpages at gmail dot com
  Target Milestone: ---

Created attachment 15202
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15202&action=edit
test case foo.c

The attached simple program, that enables floating-point exception traps on
FE_INVALID, when the exception flag for FE_INVALID is already set, show CPU
dependent behaviour.

How to reproduce:
1. Compile it with: ${CC-gcc} -ggdb -Wall foo.c -lm
2. Run it with: ./a.out; echo $?

Results with glibc:
x86_64       0
i386         Floating point exception (core dumped)
arm64        3
armelhf      3
armel        3
hppa         0
ia64         0
loongarch64  0
m68k         0
mips         0
mips64       0
powerpc      Floating point exception
powerpc64    Floating point exception
powerpc64le  Floating point exception
riscv64      3
s390         0
s390x        0
sh4          0
sparc        0
sparc64      0

I think that it is not possible to make i386 and powerpc* behave like the other
CPU types; see
https://lists.gnu.org/archive/html/bug-gnulib/2023-10/msg00104.html for why.

Nevertheless it is surprising to see platform-dependent behaviour. This was
also the reason for bug#16209.

Since the function feenableexcept is not defined by a standard, the definitive
documentation is the glibc manual. If there is a situation where the results
are undefined or platform-dependent, the documentation should tell so.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-19 18:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-01  1:29 [Bug manual/31019] New: The documentation of feenableexcept is incomplete bruno at clisp dot org
2023-11-01  1:30 ` [Bug manual/31019] " bruno at clisp dot org
2023-11-01  1:32 ` bruno at clisp dot org
2023-12-19 18:38 ` adhemerval.zanella at linaro dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).