3 ms·
> printf(“%d, %f”, f, i); // Swapping float and int – could print nonsense, or might actually work (!) I'm going to guess because the ABI says they are passed
by rwmj 6y ago
> printf(“%d, %f”, f, i); // Swapping float and int – could print nonsense, or might actually work (!)
I'm going to guess because the ABI says they are passed in int and floating point registers, so the actual order they appear doesn't matter?
- brucedawson 6y agoYep. On Windows that code will misbehave when compiled for x86, but will work "correctly" when compiled for x64, and probably ARM64.