C++ automatic template instantiation?

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu Apr 20 12:19:00 GMT 2000


> 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


More information about the Gcc mailing list