This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix libstdc++/7811
> I see. However, do you mean the C standards or the C++ standard?
He's talking about setlocale behavior in the C standard.
> This is an interesting technical point, thanks. However, once more, I'm
> not sure if the C++ standard (vs C) actually prescribes something in
> detail about this. Can you possibly help?
For C++, we check to make sure the name is valid during construction and
if it is not an excpetion is thrown. See src/localename.cc: 107
> >
> Another interesting technical point. As you say, however, it looks like
> the real point is: "Must we really match the detailed selection behavior
> of setlocale?" I don't believe that for the implementation of the
> locale functionality at issue this is mandated anywhere in the C++ standard.
>
> Benjamin, what do you think?
It's not cleary defined. The libstdc++ implementation is trying to use
POSIX semantics.
See this thread on the library mailing list:
To: C++ libraries mailing list
Message c++std-lib-9173
> My personal opinion is that my proposal is a definite improvement on the
> current situation but I'm not sure how many additional details we must
> consider to agree with the C++ standard.
It's implementation defined. You could in theory do whatever you wanted.
I think what you've implemented is sensible.
-benjamin