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