This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++/3150


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


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