[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. &var[i]

dmalcolm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 14 20:49:21 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264

--- Comment #6 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
There are some fiddly issues where the analyzer fails to figure out that ptr +
i and &ptr[i] refer to the same memory, for certain symbolic values of i.

I'm testing a partial fix for GCC 12, which at least seems to fix the
-Wanalyzer-use-of-uninitialized-value false positives identified in the
reproducer.  That said, I think for a deeper fix it's probably best to wait
until GCC 13.


More information about the Gcc-bugs mailing list