From 111493c77c8bfb4f3c55097beddae2e517153c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Thu, 29 Aug 2019 12:29:47 +0200 Subject: [PATCH] * 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 0a85df47de..49068bee77 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -48,6 +48,14 @@ Copyright (C) 1988, 1993-1994, 1999, 2001-2019 Free Software Foundation, #include +/* 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 -- 2.21.0