This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/63446] dangling reference results in confusing diagnostic from -Wuninitialized
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Oct 2014 13:51:40 +0000
- Subject: [Bug tree-optimization/63446] dangling reference results in confusing diagnostic from -Wuninitialized
- Auto-submitted: auto-generated
- References: <bug-63446-4 at http dot gcc dot gnu dot org/bugzilla/>
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.