C linkage query

Art Boyne boyne at hplvli.HP.COM
Tue Jun 13 00:49:29 AEST 1989


ark at alice.UUCP (Andrew Koenig) asks:
>Does anyone have a C compiler + linker incapable of handling this:
>
>	extern int foo;
>	main() { }
>
>That is: are there any C implementations that turn an
>`extern' declaration for a variable that is never actually
>referenced into a genuine external reference that inhibits
>linking?

Unfortunately, yes.  The old 68000 C cross compiler (64819) for the
original HP 64000 uP development system had this problem.  Fortunately,
the newer Unix-based cross compiler (64902) has this fixed.  Of course,
most people aren't concerned with portability *to* this environment.

(However, both the old and new *assemblers* exhibit this problem - so
I can't just translate my C header files for use in assembler and then
link a partial system.)

Art Boyne, boyne at hplvla.hp.com



More information about the Comp.lang.c mailing list