PR 13631 Problems in messages
François Dumont
frs.dumont@gmail.com
Mon Nov 24 22:28:00 GMT 2014
On 24/11/2014 01:23, Jonathan Wakely wrote:
> On 24/11/14 00:13 +0100, François Dumont wrote:
>> Hello
>>
>> As we are at doing some evolution in the ABI I would like to take
>> the opportunity to merge branch libstdcxx_so_7-2. The first fix was
>
> I don't think we want to merge everything, but it's certainly worth
> looking to see if there are some fixes on that branch worth taking.
Indeed, there are only 2 patches on this branch and haven't plan to
merge the other one for the debug mode. We will just be able to close
the branch then.
>
> It would have been better to do during stage 1 though :-\
Sorry about that, I submit patches when I can and you can delay them as
you want to. Just tell me about when we will be able to make it in.
>
>> about a messages facet issue. So here is the version for the trunk
>> which is the one from the branch plus management of the charset part.
>> This way messages<wchar_t> works too.
>>
>> There are still some uncovered points in this patch:
>> - I had to make codecvt _M_c_locale_codecvt public to access it from
>> the messages facet code. How do you want to handle it properly ? A
>> friend function to access it or do I make messages facet friend ?
>> - I haven't use the ABI tag yet. I know that there is a plan to tag
>> locale facets, will it work for what I am doing ?
>
> Unless I'm missing something you're not making any ABI changes to
> std::messages, just making the definitiosn of some functions no longer
> inline.
Yes, this is indeed what had been identified as the ABI breaking change,
not a big one. Considering it now I think it is not a real one.
Applications built with the former library will have an inlined wrong
behavior. Application rebuilt will use the new correct one, is there
really a problem ?
>
>> Note that I could use std::tuple instead of combination of
>> std::pair and std::unique_ptr instead of wchar_buffer if we were
>> building it in C++11 mode. Is it possible ?
>
> Yes, the symlink to the messages_members.cc file would need to be
> moved from src/c++98/Makefile.am to src/c++11/Makefile.am
>
>> Index: include/bits/locale_facets_nonio.h
>> ===================================================================
>> --- include/bits/locale_facets_nonio.h (revision 217816)
>> +++ include/bits/locale_facets_nonio.h (working copy)
>> @@ -1842,22 +1842,6 @@
>> */
>> virtual void
>> do_close(catalog) const;
>> -
>> - // Returns a locale and codeset-converted string, given a
>> char* message.
>> - char*
>> - _M_convert_to_char(const string_type& __msg) const
>> - {
>> - // XXX
>> - return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str()));
>> - }
>> -
>> - // Returns a locale and codeset-converted string, given a
>> char* message.
>> - string_type
>> - _M_convert_from_char(char*) const
>> - {
>> - // XXX
>> - return string_type();
>> - }
>> };
>
> Those members are used by the ieee_1003.1-2001 locale.
>
>
Yes, I had plan to check but forgot.
I will prepare an updated version of this patch with those information
and we will see how to handle it.
François
More information about the Libstdc++
mailing list