summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/weak/weak-7.c
blob: 7c4a4dc7c2583739dc2437acc1503fb4e1123532 (plain)
1
2
3
4
5
6
7
/* { dg-do compile } */
/* { dg-require-weak "" } */

extern void * foo (void);
void * foo (void) { return (void *)foo; } /* { dg-error "precede" } */
/* { dg-error "function pointer" "pointer conversion" { target *-*-* } 5 } */
extern void * foo (void) __attribute__((weak));