public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/71699] bogus -Wmaybe-uninitialized warning: gcc misses that non-NULL pointer + offset can never be NULL Date: Wed, 31 Mar 2021 21:11:33 +0000 [thread overview] Message-ID: <bug-71699-4-avQm8YROaK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-71699-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71699 Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.0 Status|NEW |RESOLVED Resolution|--- |FIXED CC| |msebor at gcc dot gnu.org Known to work| |9.3.0 Known to fail| |7.3.0, 8.3.0 --- Comment #13 from Martin Sebor <msebor at gcc dot gnu.org> --- At -O1 and above the warning has disappeared with r263662 (GCC 9.0.0 20180820). It's still on trunk with -O0 (and with -Og) not with higher optimization levels. But I'm not sure I see this as a problem. The test case assigns an uninitialized variable for no apparent reason and expects the assignment to be eliminated. That does happen but only with optimization. The warning could probably be enhanced to figure this out by essentially implementing the same logic as the optimization does but that seems like going too far. With so many open bugs against -Wuninitialized of higher priority with no progress for a decade or more I'm going to resolve this one as fixed.
parent reply other threads:[~2021-03-31 21:11 UTC|newest] Thread overview: expand[flat|nested] mbox.gz Atom feed [parent not found: <bug-71699-4@http.gcc.gnu.org/bugzilla/>]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-71699-4-avQm8YROaK@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).