https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116945
Paul Floyd <pjfloyd at wanadoo dot fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pjfloyd at wanadoo dot fr --- Comment #11 from Paul Floyd <pjfloyd at wanadoo dot fr> --- I’m a bit surprised that this is allowed. In C++ (and C) reading uninitialized data is Undefined Behaviour. Which means you are in the Twilight Zone with nasal demons and all that. The compiler would be perfectly justified in optimizing away the check.