This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/35509] [4.3/4.4 Regression] builtin isinf() mismatch to compile-time substitution
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Mar 2008 10:52:16 -0000
- Subject: [Bug middle-end/35509] [4.3/4.4 Regression] builtin isinf() mismatch to compile-time substitution
- References: <bug-35509-6291@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-03-08 10:52 -------
Note that one might argue that the testcase is invalid as as you say, C99 only
says isinf returns non-zero. So strictly speaking comparing the return value
of two invocations is not a way to check if both values are an infinity.
Of course this is at least an QOI issue. The question is what behavior to
retain? The glibc manpage documents returning -1 for -Inf and +1 for +Inf,
which we could preserve on glibc targets then not expanding via
isgreater(fabs(x),DBL_MAX).
(Only i386 and s390 have target dependent expansions for isinf - what is
their behavior here?)
Kaveh, you introduced the generic fallback, Andreas, what does s390 return
here, Uros, how is the situation on i386?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ghazi at gcc dot gnu dot
| |org, uros at gcc dot gnu dot
| |org, rguenth at gcc dot gnu
| |dot org, krebbel at gcc dot
| |gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35509