Re:Optimizing C++ Code: Dead Code Elimination
by demallien on Wednesday August 14, 2013 @02:04PM
(#6213158)
Yup, when I was young and naive, I would not initialize structs to zero explicitly when they were allocated on the stack. One day I had a bug that only appeared in production code, which is bad, as I was working on an embedded system, so production code = no debugger. Took me a while to figure that one out! The compiler writer that thought that it would be a good idea to zero out stack variables, but only if the code was -O0 deserves to be taken out back and shot!
[ Parent
| on HN ]
There are no comments on this comment yet.