This is the mail archive of the mailing list for the GCC 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: [v3] libstdc++/7811

Jakub Jelinek wrote:

Yes, for more recent glibcs it should include all 12


and use glibc composite format LC_CTYPE=foo;LC_NUMERIC=bar;...
On Solaris, AFAIK the composite format is like:
so the code has to be os specific.

I see, still conceptually simple but some additional complexity, in practice...
one problem I see is that
locale::_Impl::_Impl(const char* __s, size_t __refs)
doesn't make a copy of __s string when putting it into _M_names array,
which looks like a bug to me - it can point to stale data RSN, and e.g. in
the case where we are constructing _Impl(getenv("LC_ALL")) it is enough to
change environment.

This seems easy to fix, however.

Also, I wonder whether the individual _M_names in case _Impl was
passed a composite name shouldn't be the LC_CTYPE/LC_NUMERIC etc. locales,
not the composite name.

In private mail with Benjamin I hinted at this myself too, specifically in the form of some modifications needed for, lines 124-126. (while I'm writing this I see that Roland agrees)

Ciao, Paolo.

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