jacob navia said:
Well that is precisely the point. Why "is out of scope"?
Because the process of linking is entirely language independent.
Imagine the mess you'd end up with if every language specified it's own
linker -- interlanguage compatibility would go out the window or linkers
would become much more complex, expensive, and volatile. In large
companies (like IBM and HP), it's almost impossible for a compiler group
to get changes made to the linker because of the potential impact on all
the other compilers. That's why some systems have a special
"pre-linker" for C++ rather than changing the standard linker to support
it.
In all languages that is an error, even in fortran or
whatever you are linking with!
So now you know every language, too? I seem to recall that FORTRAN
explicitly allowed common blocks to differ in size from one file to
another.
It could be required to have a conforming linker. C++ did,
why C couldn't do it?
Too little benefit for the cost. The C committee made a concious
decision very early on that they wanted to remain compatible with
existing language support tools like object file formats, libraries, and
linkers so as to minimize the cost of implementation and to preserve
upward compatibility as much as possible. That was the reason for the
original restriction of external identifiers to 6 case-insensitive
characters. The only reason C99 relaxed that restriction is because the
existing linkers that are in use are more flexible.
Most linkers can be made to behave as you desire. The reason they don't
by default is because thier users don't want them to.
-Larry Jones
They can make me do it, but they can't make me do it with dignity. -- Calvin