https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70765
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Resolution|--- |WONTFIX CC| |msebor at gcc dot gnu.org Status|UNCONFIRMED |RESOLVED --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- -Wuninitialized, -Wmaybe-uninitialized, and all other flow-sensitive warnings depend on optimization (including inlining) to avoid both false positives and false negatives. This is one of the many cases that's only detectable thanks to optimization. GCC's static analyzer might be able to do better in GCC 12 (if/when -Wanalyzer-use-of-uninitialized-value becomes supported). Thus resolving as WONTFIX.