3 ms·
Yes, really. I don't think you understand the leeway that C/C++ give implementations when they encounter undefined behavior. Your mental model of how the code "
by twoodfin 13y ago
Yes, really. I don't think you understand the leeway that C/C++ give implementations when they encounter undefined behavior. Your mental model of how the code "should" be compiled can go out the window when an optimizer designed to work properly only on well-defined code goes to work:
http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html http://blog.llvm.org/2011/05/what-every-c-programmer-should-...
- babuskov 13y agoI'm sorry, but nothing in that article contradicts what I wrote. I wrote that once variable is declared, a memory location is assigned to it and this location nor it's content change over time, unless you write to (initialize) it yourself. Care to quote the sentence(s) that say differently?