summaryrefslogtreecommitdiff
path: root/src/floatfns.c
diff options
context:
space:
mode:
authorMattias Engdegård <mattiase@acm.org>2019-08-29 12:29:47 +0200
committerMattias Engdegård <mattiase@acm.org>2019-08-30 15:08:24 +0200
commit4a919b1bbc00c8084aea2a4e8196d2b38e657946 (patch)
tree84a76f3567971de084554c2d55fceea12b0116b5 /src/floatfns.c
parentd09a1d66c608e9e993ce73515cf83f785d04e407 (diff)
downloademacs-4a919b1bbc00c8084aea2a4e8196d2b38e657946.tar.gz
* src/floatfns.c: Check against __FINITE_MATH_ONLY__ (bug#37140)
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index 0a85df47dec..49068bee770 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