Re:Obfuscated Game of Life in 9 lines of C
by twoodfin on Monday December 02, 2013 @04:24PM
(#6836624)
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-...
Re:Obfuscated Game of Life in 9 lines of C
by babuskov on Tuesday December 03, 2013 @11:38AM
(#6841311)
I'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?
Unless you have something else writing to this address, the value will not change. Since the program's stack is only available to that program, it will stay the same.