This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/15367] Let gcc use __builtin_isinf
- From: "marc.glisse at normalesup dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 08 May 2013 19:41:52 +0000
- Subject: [Bug math/15367] Let gcc use __builtin_isinf
- Auto-submitted: auto-generated
- References: <bug-15367-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15367
--- Comment #9 from Marc Glisse <marc.glisse at normalesup dot org> 2013-05-08 19:41:52 UTC ---
(In reply to comment #8)
> you could do:
> __builtin_isinf_sign((x)) % 2
> to guarantee a unit result.
That's even worse. Either you trust __builtin_isinf_sign to return -1/0/+1, or
you explicitly test:
int s=__builtin_isinf_sign(x);
if(s<0) return -1;
else return s>0;
If the builtin were to return -2, the modulo would be nonsense.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.