This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81618] New: Warn for unused functions declared in local scope
- From: "jg at jguk dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 30 Jul 2017 16:07:44 +0000
- Subject: [Bug c++/81618] New: Warn for unused functions declared in local scope
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81618
Bug ID: 81618
Summary: Warn for unused functions declared in local scope
Product: gcc
Version: 5.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jg at jguk dot org
Target Milestone: ---
Hello
Could GCC warn for unused functions declared in local scope please? See
function below g()
$ cat t.C && gcc -S -Wall t.C
void f (void)
{
typedef int I;
int i;
void g ();
}
t.C: In function ‘void f()’:
t.C:4:7: warning: unused variable ‘i’ [-Wunused-variable]
int i;
^
t.C:3:15: warning: typedef ‘I’ locally defined but not used
[-Wunused-local-typedefs]
typedef int I;
^