Why static forward references
Barry Shein
bzs at bu-cs.BU.EDU
Wed Dec 24 15:55:49 AEST 1986
>extern char *blunge(); /* declare blunge */
>That "extern" just isn't needed. Why not leave it off.
Ah ha ha ha! well, sort of...gather round:
In the C code for Franz 38.92 there is a definition SPISFP.
in bigdiv.c there is (within a routine):
int *sp();
Unfortunately, there is also in a .h file (more or less):
int *xp;
#ifdef SPISFP
#define sp() xp
#endif
Well, the clever children have guessed that this rendered that
declaration:
int *xp;
thus hiding the global value. Took a while to find that one, it usually
worked (was used as a ptr to a dummy stack space to fake alloca().)
Anyhow...I was just thinking about this 'unnecessary' extern as I wiped
the blood from my eyes. (you can consider this a bug report on that Franz
if you like.)
-Barry Shein, Boston University
More information about the Comp.lang.c
mailing list