1/* { dg-do compile } */ 2/* { dg-options "-Wshadow -Wsystem-headers" } */ 3 4#include "Wshadow-4.h" 5extern void index2 (void); /* { dg-message "declaration is here" } */ 6 7void foo (double index1, 8 double index2) 9{ 10} 11 12void foo1 (void) 13{ 14 double index1; 15 double index2; 16} 17 18void foo2 (void) 19{ 20 { 21 double index1; 22 double index2; 23 } 24} 25 26void foo3 (void) 27{ 28 void (*index1)(void); /* { dg-warning "shadows" } */ 29 void (*index2)(void); /* { dg-warning "shadows" } */ 30} 31 32void 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 } */ 39