This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/50724] isnan broken by -ffinite-math-only in g++
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 14 Oct 2011 21:12:40 +0000
- Subject: [Bug middle-end/50724] isnan broken by -ffinite-math-only in g++
- Auto-submitted: auto-generated
- References: <bug-50724-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50724
--- Comment #10 from Marc Glisse <marc.glisse at normalesup dot org> 2011-10-14 21:12:40 UTC ---
As a library writer, having isnan return false is precisely what I am expecting
from -ffinite-math-only. In my code, I implement regular computations for
finite numbers, and I need some special cases for infinite and nan values,
which I test with isnan and isfinite. With -ffinite-math-only, the compiler is
able to remove those special cases entirely.