Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcdc!hpislx!hplvli!boyne From: boyne@hplvli.HP.COM (Art Boyne) Newsgroups: comp.lang.c Subject: Re: C linkage query Message-ID: <340012@hplvli.HP.COM> Date: 12 Jun 89 14:49:29 GMT References: <9449@alice.UUCP> Organization: Loveland Inst. Div Lines: 21 ark@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@hplvla.hp.com