From: Mattias Engdegård Date: Thu, 29 Aug 2019 10:29:47 +0000 (+0200) Subject: * src/floatfns.c: Check against __FINITE_MATH_ONLY__ (bug#37140) X-Git-Tag: emacs-27.0.90~1328^2~33 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4a919b1bbc00c8084aea2a4e8196d2b38e657946;p=emacs.git * src/floatfns.c: Check against __FINITE_MATH_ONLY__ (bug#37140) --- 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 . */ #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