#pragma weak foo 

void foo ();

void
ref ()
{
  if (foo)
    foo ();
}


syntax highlighted by Code2HTML, v. 0.9.1