This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/63518] New: missing Wuninitialized warning independent of order of arguments
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Oct 2014 00:51:05 +0000
- Subject: [Bug middle-end/63518] New: missing Wuninitialized warning independent of order of arguments
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63518
Bug ID: 63518
Summary: missing Wuninitialized warning independent of order of
arguments
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: manu at gcc dot gnu.org
typedef int Timeout;
void wait(Timeout, bool);
void wait2(Timeout, bool);
bool setTimeout(Timeout &t)
{
t = 5;
return true;
}
void foo(void)
{
Timeout t;
wait(t, setTimeout(t));
}
void bar(void)
{
Timeout t;
wait2(setTimeout(t),t);
}
At least one of the both variants should give a warning. Ideally, both should.
Clang warns for the first variant.