https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119913
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target|x96_64 |x86_64-*-* Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Note an uninitialized variable use is still UB, -ftrivial-auto-var-init=zero does not make it well-defined. Quoting docs: "GCC still considers an automatic variable that doesn't have an explicit initializer as uninitialized, @option{-Wuninitialized} and @option{-Wanalyzer-use-of-uninitialized-value} will still report warning messages on such automatic variables and the compiler will perform optimization as if the variable were uninitialized." In particular #if 0 int b = b1, c = c; #else int b, c; #endif has in both cases 'c' uninitialized.