https://issues.dlang.org/show_bug.cgi?id=22527
SorinM <sorin.matee...@stud.acs.upb.ro> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sorin.matee...@stud.acs.upb | |.ro --- Comment #2 from SorinM <sorin.matee...@stud.acs.upb.ro> --- Compiling this example in C: ``` #include <float.h> int main() { float f = FLT_MAX; int i = (int)f; return 0; } ``` and then looking into the assembly, you can see the cvttss2si instruction is used to perform the cast. Reading from the second paragraph of https://www.felixcloutier.com/x86/cvttss2si#description we can find the answer: 80000000H (or INT_MIN) is the result in case of floating-point invalid exception. As this is defined directly in the x86 ISA and is the default behavior in C, this will also be the case for D. --