<div dir="ltr"><div dir="ltr">Let me make some summary. I omit references for brevity, they are spread in the thread.<br><br>Treatment of `isnan` with `-ffinite-math-only` has issues:<br>   - There are many users' complaints and disagreement expressed in GCC bug tracker and forums about the treatment.<br>  - There are legitimate use cases when `isnan` needs to be called in `-ffinite-math-only` mode.<br>        - Users have to invent workarounds to get functionality of `isnan`, which results in portability and performance loss.<br>        - There is inconsistency with the behavior of libc, which always does a real check, and the compiler, which omits it.<br>Preserving `isnan` in the code would solve all of them.<br><br>What is the risk?<br><br>`-ffinite-math-only` is an optimization option, so preserving `isnan` cannot break the behavior of correct programs. The only possible negative impact is some loss of performance. It is unlikely that a real program spends so much time in `isnan` calls that it has noticeable effect, but if it does, a user can conditionally redefine `isnan` macro.<br><br>Preserving `isnan` in `-ffinite-math-only` mode is safe and makes the compiler more reliable and user-friendly. <br><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br></div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Thanks,<br>--Serge</div></div></div></div>