Robert Collins wrote:

extern int foo (void);

static void bar (int foo)
{
 /* use foo the function */
 int x = foo ();
 /* use foo the function */
 /* (OH shit) */
 int (*y) (void) = foo;
 /* use both ;) */
 x = foo + y ();
}

Almost!  What you want is:

static void
bar(int foo)
{
       int x = foo;

   int (*y) (void);
   {
       extern int foo(void);
       y = foo;
   }
   x = foo + y();
}


i.e., assign the tempory y to be the extern definition of foo.

Trent
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to