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: (not) breaking the ABI


On Wed, May 25, 2005 at 04:14:17PM +0200, Theodore Papadopoulo wrote:
> On Wed, 2005-05-25 at 14:28 +0100, chris jefferson wrote:
> > d) Change a function so does something fundamentally different, as you
> > don't know which the linker will choose to pull in (you can of course 
> > just give your new function a new signiture and delete the old one).
> 
> You certainly cannot delete the old function expect maybe if it is a
> private method. Am I missing something ?
> 
> Also, all what is templated is recompiled anyway, so ABI breakage is not
> happening when you do 
> 
> > a) turn a POD into a non-POD
> > b) add or remove virtual member functions of classes/structs
> > c) add or remove data members of classes.
> 
> one of these for a class template that is not instantiated in the
> library.so. So changes in eg containers (vector,list) seem to not incur
> any breakage.

If we care only about linkage between user code, all of which has been
compiled with a given g++/libstdc++ version, and a newer libstdc++.so,
that's right; std::list and std::vector don't matter.  But if we say that
the ABI has not changed between, say, 4.1 and 4.2, the user might expect
more, for example, that user code compiled with 4.1 links with user code
compiled with 4.2.  That would break if std::vector changes and vectors
are passed as arguments.

That doesn't mean we can't make changes, but we have to make sure that
we and the users understand the implications.


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