emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 4a919b1: * src/floatfns.c: Check against __FINITE_M


From: Mattias Engdegård
Subject: [Emacs-diffs] master 4a919b1: * src/floatfns.c: Check against __FINITE_MATH_ONLY__ (bug#37140)
Date: Fri, 30 Aug 2019 09:09:01 -0400 (EDT)

branch: master
commit 4a919b1bbc00c8084aea2a4e8196d2b38e657946
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>

    * src/floatfns.c: Check against __FINITE_MATH_ONLY__ (bug#37140)
---
 src/floatfns.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/floatfns.c b/src/floatfns.c
index 0a85df4..49068be 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -48,6 +48,14 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 
 #include <count-leading-zeros.h>
 
+/* Emacs needs proper handling of ±inf; correct printing as well as
+   important packages depend on it.  Make sure the user didn't specify
+   -ffinite-math-only, either directly or implicitly with -Ofast or
+   -ffast-math.  */
+#if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__
+ #error Emacs cannot be built with -ffinite-math-only
+#endif
+
 /* Check that X is a floating point number.  */
 
 static void



reply via email to

[Prev in Thread] Current Thread [Next in Thread]