public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/80147] missing maybe-uninitialized warning on variable with no side effects
       [not found] <bug-80147-4@http.gcc.gnu.org/bugzilla/>
@ 2021-04-01 23:28 ` msebor at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: msebor at gcc dot gnu.org @ 2021-04-01 23:28 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

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

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
Eric explained the reason for the missing warning with -O1 in the test case in
comment #0.  The code in the test case in comment #3 is folded away very early
on so there's nothing for the warning to complain about.

My guess is that Clang warns during parsing.  GCC much later on, to avoid
warning for dead code.  It's a deliberate decision.  I don't think there's
anything to fix here.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-01 23:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-80147-4@http.gcc.gnu.org/bugzilla/>
2021-04-01 23:28 ` [Bug tree-optimization/80147] missing maybe-uninitialized warning on variable with no side effects msebor at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).