2 ms·
It's seems strange me to instantly suspect that your compiler's optimizer is at fault. Which is more likely: you've found a bug in a compiler used the world ov
by jgrahamc 17y ago
It's seems strange me to instantly suspect that your compiler's optimizer is at fault. Which is more likely: you've found a bug in a compiler used the world over, or you've screwed up memory access?
Since C makes it easy to overrun memory, it's pretty easy to make horrible mistakes and have those have seemingly random consequences.
The fact that the bug changes when you change optimizer settings, add trace statements, or add debug code would make me suspect memory corruption first.
In fact, I think it's a good assumption to always begin suspecting your own code.