3 ms·
Modern compilers have a tendency to just remove code that can be proven to result in undefined behavior. This can make it very difficult to track down a problem
by kstenerud 12y ago
Modern compilers have a tendency to just remove code that can be proven to result in undefined behavior. This can make it very difficult to track down a problem because you'll be staring at the source code, assuming the code was run, unable to fathom how it could possibly have ended up in a particular state.
If the compiler were required to return an "unspecified value", you'll at least know that your code DID run (and generate an incorrect result).