1 #include <stdio.h> 2 3 extern int __attribute__ ((weak)) fun (void); 4 5 int main(void)6 main (void) 7 { 8 if (&fun != 0) 9 fun (); 10 else 11 printf ("Weak undefined\n"); 12 return 0; 13 } 14