This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/81618] New: Warn for unused functions declared in local scope


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]