Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!husc6!bunny!rhb6 From: rhb6@bunny.UUCP (Robert H. Barkan) Newsgroups: comp.sys.ibm.pc Subject: Re: MSC multiple-definition bug or feature? Summary: Oops, not a bug, original poster was a jerk, never mind, ... Keywords: Strange MSC linker behavior Message-ID: <6220@bunny.UUCP> Date: 21 Oct 88 22:36:56 GMT References: <6215@bunny.UUCP> <553@infmx.UUCP> Organization: GTE Laboratories, Waltham, MA Lines: 33 In article <553@infmx.UUCP>, greggy@infmx.UUCP (greg yachuk) writes: > 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: > > Version 3.65 (which comes with 5.1) doesn't complain about any > of the combinations that you mention. I tried the 3.61 linker > (from 5.0), and still didn't get any complaints. Of course, for > ... > The point is: howcum you linker complained and mine was silent? Apparently, my linkers (V3.61, 3.65) no longer complain [now that everyone is watching :-( ]. In simplifying the example from about 7000 lines down to 10, somewhere along the way I deleted whatever made the linker find the original multiple definition. I've been unable to find or recreate it, since the original code has also been changed. I thought that I had seen a "symbol already defined" or "symbol multiply defined" message somewhere with the larger code and also my shorter examples, but it's gone now. Without any pudding for proof, I retract my original observation. My fault for not trying everything one last time before posting!!! Yes, the second and third examples still produce side effects and/or garbage on output, but that's just the "Joy of C", not a bug. Apologies to the net, especially if you went to the trouble of typing in my examples. -Bob -- Bob Barkan rhb6%bunny@harvard.harvard.edu GTE Labs rhb6@gte.com 40 Sylvan Rd 617-466-2568 Waltham, MA 02254