This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ patch] Inline template methods


On Sun, 1 Feb 2004 11:01:48 +0100, Jan Hubicka <jh@suse.cz> 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
> category.
>
> 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.

OK.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]