mailing list of musl libc
 help / color / mirror / code / Atom feed
* math_errhandling definition
@ 2013-11-17 21:54 Bobby Bingham
  2013-11-17 23:13 ` Szabolcs Nagy
  0 siblings, 1 reply; 5+ messages in thread
From: Bobby Bingham @ 2013-11-17 21:54 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 768 bytes --]

I think the definition of math_errhandling is wrong on a couple
architectures.  C99 (7.12) says:

    If the expression math_errhandling & MATH_ERREXCEPT can be nonzero,
    the implementation shall define the macros FE_DIVBYZERO, FE_INVALID,
    and FE_OVERFLOW in <fenv.h>.

math.h always defines math_errhandling as 2 (MATH_ERREXCEPT), but
whether those FE_* macros are defined or not is architecture-dependent.
In particular, ARM only defines them if __ARM_PCS_VFP is defined, and
microblaze does not define them.

It looks like if the architecture doesn't support floating point
exceptions, math_errhandling must be MATH_ERRNO. This in turn requires
that the various math functions set errno appropriately, which it
doesn't look like musl's do.

--
Bobby Bingham

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-11-20 20:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-17 21:54 math_errhandling definition Bobby Bingham
2013-11-17 23:13 ` Szabolcs Nagy
2013-11-18 19:59   ` Rich Felker
2013-11-20  5:27     ` Bobby Bingham
2013-11-20 20:50       ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).