This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20459] New: Warning for variables that are set but not used
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2005 17:08:14 -0000
- Subject: [Bug c/20459] New: Warning for variables that are set but not used
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider:
void
foo (void)
{
int a;
a = 5;
}
Note that 'a' is set but not used.
It would be nice if GCC can issue a warning for this.
--
Summary: Warning for variables that are set but not used
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20459