3 ms·
Umh.. the compiler writers don't "exploit undefined behaviour". The compiler writers write the compiler with the expectation that the program being compiled is
by ensiferum 9y ago
Umh.. the compiler writers don't "exploit undefined behaviour".
The compiler writers write the compiler with the expectation that the program being compiled is correct i.e. to the specification.
Now when the program fails to be correct, optimizations can result in "weird" results, which is not really incorrect since the input was incorrect.