3 ms·
'"INT_MAX + 10 - 20" is legit, even though it overflows twice.' In general, maybe so. But in systems programming? What could that possibly mean that is not a b
by jerf 15y ago
'"INT_MAX + 10 - 20" is legit, even though it overflows twice.'
In general, maybe so. But in systems programming? What could that possibly mean that is not a bug? There are answers to that, but since the answers are going to be <1% corner cases it doesn't justify defaulting to the dangerous case while requiring one to jump through hoops to get the safe case. If you desperately need "INT_MAX + 10 - 20", ask for it.