MSC multiple-definition bug or feature?
Gertjan van Oosten
oosten at dutinfd.UUCP
Fri Oct 21 21:02:58 AEST 1988
In article <6215 at bunny.UUCP>, rhb6 at 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
More information about the Comp.lang.c
mailing list