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: [RFC] C++1x breaking the ABI in one more place :(


On 21 May 2010, at 02:54, Gabriel Dos Reis wrote:

> On Thu, May 20, 2010 at 8:42 PM, Joe Buck <Joe.Buck@synopsys.com> wrote:
>> On Thu, May 20, 2010 at 06:29:18PM -0700, Gabriel Dos Reis wrote:
>>> On Thu, May 20, 2010 at 8:26 PM, Mark Mitchell <mark@codesourcery.com> wrote:
>>>> Gabriel Dos Reis wrote:
>>>> 
>>>>> The bad reputation G++ has cultivated does not come from situation
>>>>> remotely close to what the original patch was about.  G++ bad reputation
>>>>> comes extensions that were introduced without much thought about
>>>>> interactions, and that were removed later, etc.  The concrete
>>>>> situation at hand comes from a change in the C++ standard itself.
>>>>> We should not be conflating the two.  Otherwise, we lose credibility.
>>>> 
>>>> You're entitled to your opinion, of course.  But, my opinion is that if
>>> 
>>> That the change comes from the definition of C++ itself is not
>>> an opinion.  It is a fact.
>> 
>> What do you propose, then?
> 
> make the change when the library is implementing C++0x.
> Leave the rest (.e.g C++03) alone.

I am already linking C++0x and C++03 binaries. If we went this route we would need some way of having (for example) boost C++0x and boost C++03 libraries on the same system, and choosing the correct one as appropriate.

I have been experimenting with inline namespaces (well strong using in the case of g++), and believe we can get quite a long way. It introduces a new twist, in that code which tries to pass certain objects over boundaries will not link. For some types (std::string in particular comes to mind), this may well not be appropriate.

I believe that:

1) std::string is going to have to be fundamentally changed, and that is going to lead to a .so bump
2) When we do that anyway, at that point we may as well clean up everything else to.

Of course, at the same time we can think about how we will fix things in future. I hope the ABI breaking of such a basic type as string might be a one-off event in the history of C++. We have learnt a lot about implementing std::string over the last 8 years or so, hopefully we can now come up with the "correct" implementation.

Chris


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