Xref: utzoo comp.sys.ibm.pc:20502 comp.lang.c:13486 Path: utzoo!utgpu!attcan!uunet!mcvax!hp4nl!dutrun!dutinfd!oosten From: oosten@dutinfd.UUCP (Gertjan van Oosten) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: Re: MSC multiple-definition bug or feature? Summary: Here comes another one... and more! Keywords: Strange MSC linker behavior Message-ID: <1099@dutinfd.UUCP> Date: 21 Oct 88 11:02:58 GMT References: <6215@bunny.UUCP> Organization: Delft Univ. of Techn., Netherlands Lines: 40 In article <6215@bunny.UUCP>, rhb6@bunny.UUCP (Robert H. Barkan) writes: > > In MSC 5.x, compile the following 2 files, then link x1.obj and y1.obj. > The linker should complain because "int x" is multiply defined: Then follows a description of some source, etc. leading to the exposure of a linker bug. I have another one for you: In one C file, I had the following (external) declaration: static int x; In another C file, I had: extern int x; Compilation and linkage produced no "Unresolved external" message!!!!! How nice of Microsoft.... I also tried this on four other machines. Here come the results, fasten seatbelts and refrain from smoking: A 3B1 running System V version 3.5: No linker error message; however, lint complains about "Used but not defined". A Microdutch running System V Release 2 X/OPEN: No linker error message; however, lint complains about "Used but not defined". A VAX running 4.3 BSD: Linker produces error message; lint complains. A PDP-11/73 running ULTRIX-11: !!!Linker produces error message; lint DOESN'T complain!!! So only 4.3 BSD functions correctly; that's ONE out of FIVE!!! Enough said... G. J. van Oosten "When you come to me I'll question myself again Is this grip of life still my own?" - David Sylvian