Annex F (informative) Core undefined behavior [ub]

F.3 [expr]: Expressions [ub.expr]

F.3.8[ub:conv.fpint.int.not.represented]
Specified in: [conv.fpint]

When converting a value of integer or unscoped enumeration type to a floating-point type, if the value is not representable in the destination type the behavior is undefined.
[Example 1: int main() { unsigned long long x2 = -1; float f = x2; // undefined behavior on systems where f does not include // a representation for infinity and the maximum value for float // is smaller than the maximum value for unsigned long long } — end example]