This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/80147] missing maybe-uninitialized warning on variable with no side effects


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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |manu at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(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).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]