libstdc++/3150

Nathan Myers ncm-nospam@cantrip.org
Fri Jan 4 12:24:00 GMT 2002


On Fri, Jan 04, 2002 at 08:27:57AM -0800, Benjamin Kosnik wrote:
> 
> > writing them explicitly allows the vtable heuristic to work.
> 
> Is there anyway you can expand on this, so when they go back in this can 
> be noted?

The keyword is "vague linkage".

  http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118

The key implication is that the destructor should be the first 
virtual member of (at least) the base-most class, and should not be 
inline or implicitly defined, because then the vtable gets emitted 
in every .o file.  

I believe that with current ABI and ELF linkers the vtables get merged 
but (1) it slows everything down and (2) not everybody has an ELF linker.

Nathan Myers
ncm at cantrip dot org



More information about the Libstdc++ mailing list