Is the casting of infinity (represented by float) to an integer an undefined behavior?
The standard says:
4.10 Floating-integral conversions<
Casting of infinity to integer is undefined.
The behavior is undefined if the truncated value cannot be represented in the destination type.
Says it all. Since truncation removes precision but not magnitude, a truncated infinity is still infinity and integers cannot represent infinity.