[Bug c++/81618] New: Warn for unused functions declared in local scope
jg at jguk dot org
gcc-bugzilla@gcc.gnu.org
Sun Jul 30 16:07:00 GMT 2017
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;
^
More information about the Gcc-bugs
mailing list