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

--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
IEEE 754 does not specify the choice of output NaN.  None of the C 
bindings to IEEE 754 specify the choice of output NaN.  There are various 
architecture differences in choice of output NaN (for example, RISC-V 
always uses a canonical quiet NaN, x87 chooses based on comparing the 
payloads, SSE chooses based on the operand order to the instruction).  
Since none of the C bindings specify anything about the choice of output 
NaN, there is no expectation that particular C syntax constructs map to 
any particular rules for choice of NaN.  And even once you have a choice 
of NaN from an arithmetic operation, the C bindings leave it 
implementation-defined whether assignment, function return and other 
conversions as if by assignment are a convertFormat or copy operation (and 
convertFormat from a type to itself might change a NaN payload).

Reply via email to