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; ^