|
![](/i/fill.gif) |
On Sun, 11 May 2008 19:32:15 +0200, Darren New <dne### [at] san rr com> wrote:
>>> OK. So the linker is doing duplicate-code removal. It also would seem
>>> to assume that all your object code is compiled with the same template
>>> source code? Or does it actually look at the object code to make sure
>>> it's the same?
>> It must be the same, or the program is ill-formed.
>
> Um, OK. But that's unenforcable, right? At least in C++?
Compilers/linkers are free to enforce it, but I think most implementors
see it as not being worth the effort.
> It seems there are two kinds of languages out there: ones where the
> program is monolithic and if you don't have all the sources, you can't
> really use the object code effectively, and ones that are particularly
> designed to avoid the problems that the first group encounter. :-)
Support for modules (similar to how Java does it) in C++ is planned for
the future. Last I heard it will not be included in the upcoming standard,
but will most likely be in the next Technical Report.
--
FE
Post a reply to this message
|
![](/i/fill.gif) |