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

--- Comment #11 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
Negation, absolute value and copysign are non-arithmetic operations in IEEE 754
and should not promote in IEEE 754 (in particular, should not convert sNaN to
qNaN). Annex F is clear that fabs and copysign raise no exceptions for
signaling NaNs, while FLT_EVAL_METHOD is specified in terms of "operators
subject to the usual arithmetic conversions" (which negation isn't; it only
does the integer promotions), and the rules on signaling NaN macros preceded by
unary '-' as translation-time initializers imply there is no promotion to a
wider evaluation format for floating types for unary '-' either, at least in
that context.

Reply via email to