This is the mail archive of the gcc@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]

Re: template memory


>>>>> Joe Buck <jbuck@synopsys.com> writes:

> At the risk of asking a stupid question:
> OK, let's say someone twisted your arm and said that you *must* free
> memory for a template instantiation after you generate it, unless it
> is an inline function.  What breaks?  Why can't you just generate a
> weak symbol immediately?

Actually, the earlier discussion was misleading; in fact, only inlines are
kept around.  Non-inlines aren't implicitly instantiated until end of file,
at which point we know what to do with them.

Jason


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