Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!rutgers!gauss.rutgers.edu!math.rutgers.edu!bumby From: bumby@math.rutgers.edu (Richard Bumby) Newsgroups: comp.lang.c Subject: Re: C linkage query Message-ID: Date: 8 Jun 89 18:27:31 GMT References: <9449@alice.UUCP> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 43 Cc: bumby In article <9449@alice.UUCP> ark@alice.UUCP (Andrew Koenig) writes: > 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? > -- > --Andrew Koenig > ark@europa.att.com I'm not sure what you are asking, but I compiled your program with the following results: Aztec C 8086 Pass1 4.10c 4-3-88 (C) 1982-1988 by Manx Software Systems, Inc. Aztec C 8086 Pass2 4.10c 4-11-88 (C) 1982-1988 by Manx Software Systems, Inc. 8086 Assembler Vers. 4.10c 3-29-88 ln linktest.o -lc Aztec C Linker Version 4.10c 3-29-88 Code: 0505 FarData: 0000 Data: 0062 Udata: 010c Total: 00067e with file sizes as shown below LINKTEST C 30 LINKTEST O 90 LINKTEST EXE 1906 The program also runs without complain (doing nothing, of course). Maybe some time I will look at the result with a debugger to see what is actually there. -- --R. T. Bumby ** Math ** Rutgers ** New Brunswick ** (in one form or another for all kinds of mail) [bumby@math.rutgers.edu]