[Bug middle-end/82839] missing -Wmaybe-uninitialized warning
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Nov 4 23:22:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
You can simplify the function to
int ts;
g();
*t = ts;
h(&ts);
Part of the analysis is not flow-sensitive: we see that ts escapes, we deduce
that g() can write to it, so ts might be initialized and we do not warn. We
miss the fact that the escape cannot happen before the call to g.
More information about the Gcc-bugs
mailing list