From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2637 invoked by alias); 17 Feb 2014 17:28:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2607 invoked by uid 48); 17 Feb 2014 17:28:19 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60237] isnan fails with -ffast-math Date: Mon, 17 Feb 2014 17:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg01722.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60237 --- Comment #7 from Marc Glisse --- (In reply to N Schaeffer from comment #6) > Is there somewhere a rationale for not making isnan() find NaN's with > -ffinite-math-only ? finite-math-only is basically a promise that isinf and isnan always return false... I have inline library functions that do: if (isnan(x)) ... When compiled with -ffinite-math-only, I want this eliminated as dead code, that's the reason I made the function inline in the first place. Another way to cheat: int myisnan(double)__asm__("isnan");