unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Andreas Schwab <schwab@suse.de>, Richard Stallman <rms@gnu.org>
Cc: 37140@debbugs.gnu.org, huszaghmatt@gmail.com, npostavs@gmail.com
Subject: bug#37140: 27.0.50; calc gives "Wrong type argument: number-or-marker-p, inf" to many operations
Date: Thu, 29 Aug 2019 12:32:42 +0200	[thread overview]
Message-ID: <a04b376c1c1db680cc2a8282e336356d15037082.camel@acm.org> (raw)
In-Reply-To: <mvmimqhvf4s.fsf@suse.de>

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

ons 2019-08-28 klockan 11:00 +0200 skrev Andreas Schwab:

> -ffinite-math-only defines __FINITE_MATH_ONLY__=1, so this can be
> used as a test.

Thank you. Any objections to the following?



[-- Attachment #2: 0001-src-floatfns.c-Check-against-__FINITE_MATH_ONLY__-bu.patch --]
[-- Type: text/x-patch, Size: 1006 bytes --]

From 111493c77c8bfb4f3c55097beddae2e517153c24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
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 <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
-- 
2.21.0


  reply	other threads:[~2019-08-29 10:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22  4:40 bug#37140: 27.0.50; calc gives "Wrong type argument: number-or-marker-p, inf" to many operations Matt Huszagh
2019-08-22 13:08 ` Noam Postavsky
2019-08-22 19:07   ` Matt Huszagh
2019-08-23  7:02     ` Eli Zaretskii
2019-08-23 17:33       ` Matt Huszagh
2019-08-23 18:11         ` Stefan Kangas
2019-08-23 19:47           ` Glenn Morris
2019-08-23 20:13             ` Eli Zaretskii
2019-08-24 12:08 ` Mattias Engdegård
2019-08-24 12:34   ` Eli Zaretskii
2019-08-24 12:38     ` Eli Zaretskii
2019-08-24 18:38       ` Mattias Engdegård
2019-08-24 23:02         ` Richard Stallman
2019-08-27 10:39           ` Mattias Engdegård
2019-08-27 23:26             ` Richard Stallman
2019-08-28  9:00               ` Andreas Schwab
2019-08-29 10:32                 ` Mattias Engdegård [this message]
2019-08-29 10:36                   ` Andreas Schwab
2019-08-29 10:50                     ` Mattias Engdegård
2019-08-29 12:36                   ` Eli Zaretskii
2019-08-29 12:39                     ` Eli Zaretskii
2019-08-30 13:13                       ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a04b376c1c1db680cc2a8282e336356d15037082.camel@acm.org \
    --to=mattiase@acm.org \
    --cc=37140@debbugs.gnu.org \
    --cc=huszaghmatt@gmail.com \
    --cc=npostavs@gmail.com \
    --cc=rms@gnu.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).