(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
Wunused-local-typedefs.c
       1  /*  Origin PR c/53702
       2      { dg-options "-Wunused-local-typedefs" }
       3      { dg-do compile }
       4  */
       5  
       6  /* Only test nested functions for C.  More tests that work for C and C++
       7     can be found in c-c++-common.
       8  */
       9  
      10  void
      11  test0 ()
      12  {
      13    typedef int foo; /* { dg-warning "locally defined but not used" } */
      14    void f ()
      15    {
      16    }
      17  }
      18  
      19  void
      20  test1 ()
      21  {
      22    void f ()
      23    {
      24      typedef int foo; /* { dg-warning "locally defined but not used" } */
      25    }
      26  }
      27  
      28  
      29  void
      30  test2 ()
      31  {
      32    void f ()
      33    {
      34    }
      35    typedef int foo; /* { dg-warning "locally defined but not used" } */
      36  }