This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/36390] New: Unused variable warning should be more useful
- From: "jmfo1982 at yahoo dot es" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 May 2008 13:16:37 -0000
- Subject: [Bug c/36390] New: Unused variable warning should be more useful
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc and g++ (all the versions I've ever used) don't give unused variable
warnings in a lot of cases where there are unused variables. Simple sample
code:
int test1 ()
{
int x = 3;
return (2);
}
int test2 ()
{
int x;
x = 3;
return (2);
}
They only give an unused variable warning in test1 function. They should warn
in both cases.
--
Summary: Unused variable warning should be more useful
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jmfo1982 at yahoo dot es
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36390