|
Message-ID: <20131117215454.GA9505@duality.lan>
Date: Sun, 17 Nov 2013 15:54:54 -0600
From: Bobby Bingham <koorogi@...rogi.info>
To: musl@...ts.openwall.com
Subject: math_errhandling definition
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
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.