This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Repo mechanism worse than in version 2.7.2
- To: duncans at sco dot COM, gcc-bugs at gcc dot gnu dot org
- Subject: Re: Repo mechanism worse than in version 2.7.2
- From: Mike Stump <mrs at windriver dot com>
- Date: Thu, 24 Feb 2000 12:04:56 -0800 (PST)
[ pardon the dup, I forgot to send to the list also... ]
> Date: Thu, 24 Feb 2000 17:03:47 +0000
> From: Duncan Stansfield <duncans@sco.COM>
> The problem is the repo mechanism does not instantiate as many
> symbols during the recompilation step.
This is a feature, not a bug.
> Is this a bug?
Nope.
> Is there any plan to alter this behaviour?
Nope, not really. Exported templates I think will make this work when
implemented and your code fixed to use it, if you want.
> Is it possible to use the output from the linker to instantiate
> extra object code (The repo mechanism has the code, why can't it
> instantiate the function?)?
Welcome to C++. Every use of a template must be able to see the
definition of everything it uses, the only exception is for exported
templates as I recall. You fail to show the definition of
firstclass<int>::method(void) to secondclass.o. This is wrong. You
must show the defition to second.o, if you want to code in standard
C++. As a undocumented g++ extension, you can also fix it by having
some file, any file have a use of firstclass<int>::method(void) and
have it be shown the definition for it, but this of course is
non-standard C++.