This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Final intermodule patch
On Fri, 2003-07-11 at 15:18, Neil Booth wrote:
> Geoffrey Keating wrote:-
>
> > * cpplib.c (undefine_macros): New.
> > (cpp_undef_all): New.
>
> This is problematic as memory is never freed.
I think the intermodule patch is somewhat flawed, despite it's very
laudable goals.
The patch I commited to make_decl_rtl will break the new functionality,
in that static functions and variables will no longer be renamed apart.
But, they should not be renamed anyhow.
Doing so will break debugging ("break foo" will not work) and it breaks
the kinds of assembly tricks that crtstuff.c does -- and on which lots
of code relies.
Unfortunately, if we try to generate a single .s file we have no choice
but to rename the functions apart.
The solution is to generate multiple .s files. If, for example,
cross-module inlining is going to be performed, fine -- but you still
get multiple .s files out. If a static entity in one .o file needs to
be reached from another .o file, an external-linkage alias for the
entity should be defined with a funny name.
(All of these issues arise in the idea of "template repositories" in
C++, and Cfront had lots of misadventures in this area, so we have prior
art to learn from when we add this new functionality.)
I think this patch should probably be reverted until these issues get
sorted out.
--
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC