(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
Wshadow-4.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-Wshadow -Wsystem-headers" } */
       3  
       4  #include "Wshadow-4.h"
       5  extern void index2 (void); /* { dg-message "declaration is here" } */
       6  
       7  void foo (double index1,
       8  	  double index2)
       9  {
      10  }
      11  
      12  void foo1 (void)
      13  {
      14    double index1;
      15    double index2;
      16  }
      17  
      18  void foo2 (void)
      19  {
      20    {
      21      double index1;
      22      double index2;
      23    }
      24  }
      25  
      26  void foo3 (void)
      27  {
      28    void (*index1)(void); /* { dg-warning "shadows" } */
      29    void (*index2)(void); /* { dg-warning "shadows" } */
      30  }
      31  
      32  void foo4 (void)
      33  {
      34    void index1(void) {}; /* { dg-warning "shadows" } */
      35    void index2(void) {}; /* { dg-warning "shadows" } */
      36  }
      37  
      38  /* { dg-message "declaration is here" "" { target *-*-* } 0 } */