This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/15367] Let gcc use __builtin_isinf


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]