This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] C++1x breaking the ABI in one more place :(
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.
> ?One library for the older standard and one
> for the newer? ?How else to support both existing binary executables,
> and code that uses the latest standard?
>
For C++0x, take advantage of inline namespaces where appropriate.
Which probably means one library for C++03, and another for C++0x.
Note however that it would be a fool's errand to believe that C++0x library
is binary compatible with C++03. LWG tried to believe that, only to fool
itself, occasionally breaking ABI in not always coherent manner.
There are many changes in C++0x that require ABI changes, and we just
have to recognize that simple fact and make the changes when we are ready,
e.g. when C++0x components have been fully implemented and ready for
prime time use. It would have been nice if C++0x were source and binary
compatible with C++03. But it isn't. Sad but true.