public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "iano at apple dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/28796] __builtin_nan() and __builtin_unordered() inconsistent Date: Tue, 22 Aug 2006 01:45:00 -0000 [thread overview] Message-ID: <20060822014547.8346.qmail@sourceware.org> (raw) In-Reply-To: <bug-28796-13128@http.gcc.gnu.org/bugzilla/> ------- Comment #11 from iano at apple dot com 2006-08-22 01:45 ------- About the manual wrongheadedness: The major argument that I have heard from members of the GCC community (here and elsewhere) against isnan() in its various forms correctly detecting NaN when various hacky math flags are turned on, is that the hacky math flags are defined to preclude the presence of NaNs. The argument goes that the user actually asked for the possibility all NaNs to be ignored! This is circular reasoning. The fact of the matter is that GCC defines all the meanings of the flags. You can't claim the user wanted isnan(NaN) to return 0, because you provided him with no opportunity to say otherwise. I contend that given the choice, the user will want isnan(NaN) to correctly detect NaN's even if the rest of the application does not, because when one is walking on a tight rope, it is good to have a safety net in case something goes wrong. You can't deal with NaNs in special case code unless you have a way to find them. What you've given him is a choice between unavoidably wrong results, or "poor speed". If you can find a set of flags that would allow the user to do speed enhancing things like assume that make the assumption that x-x is always 0, while at the same time have __builtin_isnan(NaN) still work in the same compilation unit -- we want these things to inline for speed! -- then I will be happy to concede this point. Otherwise, I assert that the overly simple interpretation of these flags currently in practice does not serve the developer's needs. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28796
next prev parent reply other threads:[~2006-08-22 1:45 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-08-22 0:17 [Bug c/28796] New: " iano at apple dot com 2006-08-22 0:23 ` [Bug target/28796] " pinskia at gcc dot gnu dot org 2006-08-22 0:24 ` pinskia at gcc dot gnu dot org 2006-08-22 0:28 ` pinskia at gcc dot gnu dot org 2006-08-22 0:31 ` [Bug c/28796] " iano at apple dot com 2006-08-22 0:31 ` [Bug middle-end/28796] " pinskia at gcc dot gnu dot org 2006-08-22 0:35 ` pinskia at gcc dot gnu dot org 2006-08-22 0:39 ` iano at apple dot com 2006-08-22 0:42 ` Andrew Pinski 2006-08-22 0:42 ` pinskia at physics dot uc dot edu 2006-08-22 0:49 ` iano at apple dot com 2006-08-22 1:38 ` wilson at specifix dot com 2006-08-22 1:45 ` iano at apple dot com [this message] 2006-08-22 2:06 ` iano at apple dot com 2006-08-22 8:26 ` rguenth at gcc dot gnu dot org 2006-08-22 18:25 ` iano at apple dot com 2006-08-24 13:03 ` rguenth at gcc dot gnu dot org 2006-08-24 13:17 ` rguenth at gcc dot gnu dot org 2006-08-24 13:42 ` rguenth at gcc dot gnu dot org 2006-10-21 10:13 ` rguenth at gcc dot gnu dot org 2006-10-24 9:15 ` rguenth at gcc dot gnu dot org 2006-10-24 9:19 ` rguenth at gcc dot gnu dot org 2006-10-24 9:23 ` rguenth at gcc dot gnu dot org 2006-11-06 9:33 ` rguenth at gcc dot gnu dot org 2008-01-22 14:49 ` rguenth at gcc dot gnu dot org
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 * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20060822014547.8346.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).