[Bug tree-optimization/63446] dangling reference results in confusing diagnostic from -Wuninitialized

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 3 13:51:00 GMT 2014


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

--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #6)
> What about [...]

That's roughly what I describe in comment #2, amended by comment #3.

> It could be a matter of following the chain of VUSE->VDEF,
> which I think we already do for Wuninitialized.

IIRC we don't, and the file contains a comment saying that it would be
expensive. Actually, properly limiting the maximal depth of the walk (as is
done in several other passes) would make it cheap enough and we should probably
do it.

Note that if make_foo was static or inline, it wouldn't exist anymore in the
uninit pass.


More information about the Gcc-bugs mailing list