[Bug middle-end/70765] GCC fails to detect possibly uninitialized variable

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 12 20:32:43 GMT 2021


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.


More information about the Gcc-bugs mailing list