This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.26.9000-1065-g3c7d031
- From: wilco at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 3 Jan 2018 13:16:15 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.26.9000-1065-g3c7d031
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 3c7d03129498e7426855b5d4cdd5b7109ecc2172 (commit)
from 7eff095459d5720642e0a8e6766852fe2fa65310 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c7d03129498e7426855b5d4cdd5b7109ecc2172
commit 3c7d03129498e7426855b5d4cdd5b7109ecc2172
Author: Wilco Dijkstra <wdijkstr@arm.com>
Date: Wed Jan 3 13:14:10 2018 +0000
Improve math_errhandling
Currently math_errhandling is always set to MATH_ERRNO | MATH_ERREXCEPT
even if -fno-math-errno is used. It is not defined at all when fast-math
is used. Set it to 0 with fast-math - this is noncomforming but more
useful than not define math_errhandling at all. Also take __NO_MATH_ERRNO__
into account and update comment.
* math/math.h (math_errhandling): Set to 0 with __FAST_MATH__.
Add __NO_MATH_ERRNO__ check.
diff --git a/ChangeLog b/ChangeLog
index d87d799..68b8c93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-02 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * math/math.h (math_errhandling): Set to 0 with __FAST_MATH__.
+ Add __NO_MATH_ERRNO__ check.
+
2018-01-02 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/mips32/libm-test-ulps: Update.
diff --git a/math/math.h b/math/math.h
index 633681e..3c515f8 100644
--- a/math/math.h
+++ b/math/math.h
@@ -665,10 +665,16 @@ enum
# define MATH_ERRNO 1 /* errno set by math functions. */
# define MATH_ERREXCEPT 2 /* Exceptions raised by math functions. */
-/* By default all functions support both errno and exception handling.
- In gcc's fast math mode and if inline functions are defined this
- might not be true. */
-# ifndef __FAST_MATH__
+/* By default all math functions support both errno and exception handling
+ (except for soft floating point implementations which may only support
+ errno handling). If errno handling is disabled, exceptions are still
+ supported by GLIBC. Set math_errhandling to 0 with -ffast-math (this is
+ nonconforming but it is more useful than leaving it undefined). */
+# ifdef __FAST_MATH__
+# define math_errhandling 0
+# elif defined __NO_MATH_ERRNO__
+# define math_errhandling (MATH_ERREXCEPT)
+# else
# define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
# endif
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
math/math.h | 14 ++++++++++----
2 files changed, 15 insertions(+), 4 deletions(-)
hooks/post-receive
--
GNU C Library master sources