public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kim.walisch at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/101831] Spurious maybe-uninitialized warning on std::array::size
Date: Fri, 21 Jan 2022 21:32:17 +0000 [thread overview]
Message-ID: <bug-101831-4-qUOcrdlUGr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101831-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101831
kim.walisch at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kim.walisch at gmail dot com
--- Comment #2 from kim.walisch at gmail dot com ---
> I'm not sure that the std::array use case is common enough to justify the potential for the false negatives
I just hit the same GCC warning on completely valid code. Both Clang & MSVC
correctly do not issue any warning.
void Foo::func()
{
std::array<uint64_t, 8> pos;
assert(pos.size() == static_global_array.size());
...
}
In member function ‘void Foo::func()’:
warning: ‘pos’ may be used uninitialized [-Wmaybe-uninitialized]
312 | assert(pos.size() == buffers_.size());
next prev parent reply other threads:[~2022-01-21 21:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 16:13 [Bug c++/101831] New: " m101010a at gmail dot com
2021-08-16 19:18 ` [Bug tree-optimization/101831] " msebor at gcc dot gnu.org
2022-01-21 21:32 ` kim.walisch at gmail dot com [this message]
2022-01-24 21:31 ` [Bug tree-optimization/101831] [11/12 Regression] " msebor at gcc dot gnu.org
2022-01-27 21:34 ` msebor at gcc dot gnu.org
2022-01-28 2:03 ` pinskia at gcc dot gnu.org
2022-02-01 18:54 ` msebor at gcc dot gnu.org
2022-02-02 0:22 ` cvs-commit at gcc dot gnu.org
2022-02-02 0:24 ` [Bug tree-optimization/101831] [11 " msebor at gcc dot gnu.org
2022-04-21 7:50 ` rguenth at gcc dot gnu.org
2023-05-29 10:05 ` jakub at gcc dot gnu.org
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-101831-4-qUOcrdlUGr@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: link
Be 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).