N2479 C17..C2x working draft — February 5, 2020 ISO/IEC 9899:202x (E):
6.3.1.4 Real floating and integer:
1 When a finite value of standard floating type is converted to an integer type other than _Bool, the fractional part is discarded (i.e., the value is truncated toward zero). If the value of the integral part cannot be represented by the integer type, the behavior is undefined.
IEEE 754-2019:
5.8 Details of conversions from floating-point to integer formats:
When a NaN or infinite operand cannot be represented in the destination format and this cannot otherwise be indicated, the invalid operation exception shall be signaled. When a numeric operand would convert to an integer outside the range of the destination format, the invalid operation exception shall be signaled if this situation cannot otherwise be indicated.
I.e. the C says the behavior is undefined while IEEE 754 says the invalid operation exception shall be signaled. Meaning that w.r.t. exception signalling there is well-defined behavior (IEEE 754) inside the undefined behavior (C). Is it a contradiction between C and IEEE 754? Please explain.