[Bug target/28795] __builtin_isunordered() and __builtin_isnan() should behave consistently
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-08-22 00:07 --- First -ffinite-math-only results are correct. Second this is fully a target issue. Third the -funsafe-math-optimizations problem is PR 19116. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Component|c |target http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28795
[Bug target/28795] __builtin_isunordered() and __builtin_isnan() should behave consistently
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-08-22 00:10 --- If you read the C99 standard and it mentions specificly about the case where NaNs are not supported isnan should always return false. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28795
[Bug target/28795] __builtin_isunordered() and __builtin_isnan() should behave consistently
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-08-22 00:13 --- ...with emphasis on the last sentence. I can not do this until you are actually C99 compliant *all the time*. I have to support well written legacy applications that expect this macro to work *all the time*. For if you read the docs for -ffinite-math-only, it specificially says finite fp is only supported which means it is compliant to the C99 standard. And for the fact -mno-ieee-fp says we don't support IEEE FP for compares which means no NaNs when doing compares: -mieee-fp -mno-ieee-fp Control whether or not the compiler uses IEEE floating point comparisons. These handle correctly the case where the result of a comparison is unordered. so this is invalid and/or a dup bug. So closing as invalid. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28795
[Bug target/28795] __builtin_isunordered() and __builtin_isnan() should behave consistently
--- Comment #4 from iano at apple dot com 2006-08-22 00:14 --- Pinski, look at the data I presented. You do not actually return 0 for these cases -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28795
[Bug target/28795] __builtin_isunordered() and __builtin_isnan() should behave consistently
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-08-22 00:16 --- (In reply to comment #4) Pinski, look at the data I presented. You do not actually return 0 for these cases Try it on a real processor instead of x86 which does funny stuff in the back-end and does not fully support IEEE math without longer compares. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28795
[Bug target/28795] __builtin_isunordered() and __builtin_isnan() should behave consistently
--- Comment #6 from iano at apple dot com 2006-08-22 00:18 --- Subject: Re: __builtin_isunordered() and __builtin_isnan() should behave consistently On Aug 21, 2006, at 5:16 PM, pinskia at gcc dot gnu dot org wrote: --- Comment #5 from pinskia at gcc dot gnu dot org 2006-08-22 00:16 --- (In reply to comment #4) Pinski, look at the data I presented. You do not actually return 0 for these cases Try it on a real processor instead of x86 which does funny stuff in the back-end and does not fully support IEEE math without longer compares. Can I get this reviewed by someone a little less prejudicial, please? Cloned as 28796. Ian -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28795
[Bug target/28795] __builtin_isunordered() and __builtin_isnan() should behave consistently
--- Comment #7 from pinskia at gcc dot gnu dot org 2006-08-22 00:37 --- I should mention We intend for a library implementor to be able to simply #define each standard macro to its built-in equivalent. is when not using -ffast-math and other options which turn off IEEE/C99 complaincy which is what exactly those options do. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28795