Is casting of infinity to integer undefined?
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.