summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wnested-externs-2.c
blob: 77bed5faf370cac778b5b5b624fec9fcc10d56b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* PR c/70791 */
/* { dg-do compile } */
/* { dg-options "-Wnested-externs" } */

void
bar (void)
{
  extern int i; /* { dg-warning "14:nested extern declaration of 'i'" } */
  extern short foo (void); /* { dg-warning "16:nested extern declaration of 'foo'" } */
  extern struct S *s; /* { dg-warning "20:nested extern declaration of 's'" } */
}