https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123036

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|NaN != NaN should be false, |NaN != NaN should be true,
                   |but is true                 |but fails

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am not sure you reading this correctly.
Plus the comments in your testcase says `NAN != NAN` should be true which it is
but that is different from your commentary above:
Therefore, GCC should reject the following program, but accepts it


Which is it?

Also `"compareQuietNotEqual" is simply the negation of "compareQuietEqual"` so
!(a == a) is what `a!=a` correct? If so then `NAN==NAN` is false.

ISO/IEC 9899:2024 has this even:

F.9.4
Relational operators
x != x→false  The expression x != x is true if x is a NaN.
x == x→true   The expression x = x is false if x is a NaN.

So I think you reading something incorrectly.

Reply via email to