top | item 5131763

Nobody Expects the Spanish Inquisition, or INT_MIN to be Divided by -1

10 points| malloc47 | 13 years ago |blog.regehr.org | reply

1 comment

order
[+] millerc|13 years ago|reply
Call me dense, but why on Earth would this raise a Floating-Point exception in any compiler? That seems wildly misleading considering there are no FP operation going on, the integer division is supposed to stay in the integer domain - or return an integer NaN, which I'll admit is a rarity. Am I missing something?