3 ms·
"It's not the compiler" is always a good first-approximation. And then bizarre things happen.. I ran into this with MSVC just a few months back. After an updat
by Remnant44 6y ago
"It's not the compiler" is always a good first-approximation. And then bizarre things happen..
I ran into this with MSVC just a few months back. After an update of the compiler, a bizarre display issue emerged with lines criss-crossing the screen. Turning off optimizations to debug made the problem go away. Eventually tracked down the issue to the following line of code:
if (abs(delta.y) > abs(delta.x)) { …
changing this to:
bool yDominant = abs(delta.y) > abs(delta.x);
if (yDominant) { …
fixed the problem. Yikes!
I don't know if they fixed the optimization in question by now.