From: | mrs@kithrup.com (Mike Stump) |
Newsgroups: | comp.compilers |
Date: | 22 Aug 1998 23:36:13 -0400 |
Organization: | Kithrup Enterprises, Ltd. |
References: | 98-08-147 98-08-148 |
Keywords: | linker, C++ |
John McEnerney <johnmce@world.std.com> wrote:
>One possibility is to compare the size/contents of duplicate modules and,
>if they match, discard all but one; otherwise report some sort of error.
Nope, can't work for C++. Please see the standard. Hint think about
how the contents change if you say -O9 in one translation unit and -00
in another. See my other post for how to overcome this.
>In the Metrowerks C/C++ compilers and linkers, we use a storage-class
>attribute that indicates that a symbol is expected to have multiple
>definitions, and that all are guaranteed by the compiler to have identical
>contents.
Hum, if you have it implemented, then, let me ask, do you actually
compare full contents? I hope not (unless you interpret the stuff).
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.