This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/80147] missing maybe-uninitialized warning on variable with no side effects
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Aug 2018 02:03:03 +0000
- Subject: [Bug tree-optimization/80147] missing maybe-uninitialized warning on variable with no side effects
- Auto-submitted: auto-generated
- References: <bug-80147-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80147
--- Comment #6 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #2)
> (In reply to Eric Gallager from comment #1)
> > ...but if that's the case, then why doesn't the warning go away for i1, too?
>
> Because "is-used" is given before optimization, while may-be-used are given
> after optimization. I don't think this is a bug, but expected behaviour
> given that optimization should allow more precise warnings (hence,
> discarding a false positive). It would be nice if we could avoid warning
> about f1(i1), but that is hard with the current Wuninitialized
> implementation (and a different already reported bug).
Which other bug is that?