This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77430] New: warn about redundant assignments
- 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: Wed, 31 Aug 2016 19:01:09 +0000
- Subject: [Bug c++/77430] New: warn about redundant assignments
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77430
Bug ID: 77430
Summary: warn about redundant assignments
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: manu at gcc dot gnu.org
Target Milestone: ---
Simple testcase:
int foo(int a)
{
a = 0;
a = 0; /* missing warning */
return a;
}
More complex cases present in GCC:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77421#c5