view gcc/testsuite/gcc.dg/Wunused-local-typedefs.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/*  Origin PR c/53702
    { dg-options "-Wunused-local-typedefs" }
    { dg-do compile }
*/

/* Only test nested functions for C.  More tests that work for C and C++
   can be found in c-c++-common.
*/

void
test0 ()
{
  typedef int foo; /* { dg-warning "locally defined but not used" } */
  void f ()
  {
  }
}

void
test1 ()
{
  void f ()
  {
    typedef int foo; /* { dg-warning "locally defined but not used" } */
  }
}


void
test2 ()
{
  void f ()
  {
  }
  typedef int foo; /* { dg-warning "locally defined but not used" } */
}