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/17441] isnan() should use __builtin_isnan() in GCC


https://sourceware.org/bugzilla/show_bug.cgi?id=17441

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
If making glibc classification macros use those that are built-in to GCC 
(which I agree is generally a good idea; bug 15367 makes the same request 
for isinf), there are two issues to be careful about:

* Check what GCC version made the classification built-in function 
type-generic, to avoid relying on it being type-generic in older GCC.

* Check whether the GCC version properly handles signaling NaNs; if not, 
what the header does may need to be conditional on __SUPPORT_SNAN__.  
(Properly means that the classification macro should not raise exceptions 
for a signaling NaN argument.  isnan (x) is different from isunordered (x, 
x), because the former should not raise "invalid" for signaling NaNs, but 
the latter should.)  If the GCC version does not properly handling 
signaling NaNs (given -fsignaling-nans), that should of course be reported 
as a GCC bug (and on some platforms, even calling a function may raise 
spurious exceptions for signaling NaNs - GCC bug 56831 on 32-bit x86).

-- 
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]