public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106541] New: Missing -Wuninitialized on self initialization if external code is called earlier in the function
@ 2022-08-05 22:18 blubban at gmail dot com
0 siblings, 0 replies; only message in thread
From: blubban at gmail dot com @ 2022-08-05 22:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106541
Bug ID: 106541
Summary: Missing -Wuninitialized on self initialization if
external code is called earlier in the function
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
struct my_class {
int data[4];
};
void fn1();
void fn2()
{
my_class local = local;
}
void fn3()
{
fn1();
my_class local = local;
}
Compile with g++ -Wall.
Expected: Two warnings. Or maybe zero, if this is not considered a use.
Actual: Former complains, latter does not. That extra function call should not
affect the warning count.
https://godbolt.org/z/vhdnq1Ec1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-05 22:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 22:18 [Bug c++/106541] New: Missing -Wuninitialized on self initialization if external code is called earlier in the function blubban at gmail dot com
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).