This is the mail archive of the
mailing list for the GCC project.
Re: [C++ patch] Inline template methods
- From: Jason Merrill <jason at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Sun, 01 Feb 2004 21:50:10 -0500
- Subject: Re: [C++ patch] Inline template methods
- References: <20040201100148.GC3278@kam.mff.cuni.cz>
On Sun, 1 Feb 2004 11:01:48 +0100, Jan Hubicka <email@example.com> wrote:
> while looking at the "export" keyword thread, I noticed that we never
> inline template methods when they are not explicitely marked "inline".
> This is because they always are weak and we are afraid to inline
> something that may not be bound locally.
> While this rule I think can make sense for C where if I weakize
> something, i am doing so because I want to overwrite it by something
> different, I think the implementation of COMDAT flag in C++ is not this
> This patch is about the most conservative approach I can come with.
> Does it look OK? I would prefer something like this to go to 3.4 too.
I think this is appropriate. It would still be possible in theory to
replace a template instantiation in a shared library with a different one,
but templates already make separate compilation so complicated that I don't
think this change would do any harm.