This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: (not) breaking the ABI
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Cc: Paolo Carlini <pcarlini at suse dot de>,chris jefferson <caj at cs dot york dot ac dot uk>,libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 25 May 2005 12:18:13 -0700
- Subject: Re: (not) breaking the ABI
- References: <42947D8B.8050502@cs.york.ac.uk> <429481C2.3000506@suse.de> <1117030457.22250.114.camel@mururoa>
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.