>>106341714
I have ~100k lines in C++. Inside of it are many, many instances of undefined behavior. I compile with O3. The compiler has never bitten me in the ass and "broken my code". Not once in the last 8 years. The most unexpected thing it ever did was erroneously optimize out a (useless) copy of a vector I made and clear()'d the original vector.
std::vector intermediaryVector;
for (auto& someVal : parentContainer) {
intermediaryVector.emplace_back(someVal); //parentVector was at one point a hash map, hence why this code is doing this.
}
parentContainer.clear(); //Compiler codegen cleared intermediaryVector here because it was just an alias. Smart compiler, dumb programmer.


Absolute dogshit code that only came about because I was iterating over a serialization feature and not cleaning up after myself when making changes.
And yet it was not undefined behavior, and it was doing that on O0. It was also a trivial fix, I just actually stopped being retarded for 5 minutes and cleaned up after myself properly.

I can't imagine what kind of programmatic diarrhea you have to be leaking into a codebase to be this afraid of your compiler. And to add on top of that, how bad at your job you have to be for it to not be immediately noticeable and fixed.