This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ automatic template instantiation?
> I'll look into Mike's suggestion (--gc-sections), but if that
> doesn't produce the right results, I see no other way of getting rid
> of duplicate instantiations with gcc.
I believe there is no technical reason why -frepo must produce smaller
binaries than the automatic on-demand instantiation. When it does,
then it is a bug in the compiler, and needs to be
fixed. Instantiations should be emitted only if they are really
referenced. This, of course, can be only known after potential callers
have been generated.
Regards,
Martin