aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/funcdef-var-1.c
blob: 63a56838afe9dad5a65a91603b172391e2d3a74a (plain)
1
2
3
4
5
6
7
8
9
10
/* Test ICE on defining function with a name previously declared as a
   nonfunction.  Bug 28299 from Bernhard Fischer
   <aldot@gcc.gnu.org>.  */
/* { dg-do compile } */
/* { dg-options "-Wmissing-prototypes" } */

extern __typeof(foo) foo __asm__(""); /* { dg-error "undeclared" } */
/* { dg-message "note: previous declaration" "previous declaration" { target *-*-* } 7 } */
void *foo (void) {} /* { dg-error "redeclared as different kind of symbol" } */
/* { dg-warning "no previous prototype" "no previous prototype" { target *-*-* } 9 } */