MSC multiple-definition bug or feature?

Sean Fagan seanf at sco.COM
Sun Oct 23 08:19:29 AEST 1988


In article <1099 at dutinfd.UUCP> oosten at dutinfd.UUCP (Gertjan van Oosten) writes:
|In article <6215 at bunny.UUCP>, rhb6 at bunny.UUCP (Robert H. Barkan) writes:
|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: 
[says that only 4.3BSD works correctly.]

Running XENIX, for the '386, Microsoft C Compiler (also '386), the linker
complains bitterly.
Also, lint ends up (quite nicely, I think) complaining that x is used but
never defined in t1.c, and that x is defined but never used in t2.c (which
is, of course, correct).

So this means that Xenix is as good as 4.3 BSD?  Glad *somebody* realized it
8-).
-- 
Sean Eric Fagan  | "ld runs like a turtle out of antartica"
seanf at sco.UUCP   |     Steven Ryan (smryan at garth.UUCP)
(408) 458-1422   | Any opinions expressed are my own, not my employers'.



More information about the Comp.lang.c mailing list