view gcc/testsuite/gcc.dg/funcdef-var-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* 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 *-*-* } .-1 } */
void *foo (void) {} /* { dg-error "redeclared as different kind of symbol" } */
/* { dg-warning "no previous prototype" "no previous prototype" { target *-*-* } .-1 } */