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: iostream changes locale to format a number


Stephen M.Webb wrote:

>On May 3, 2002 08:30 am, Paolo Carlini wrote:
>  
>
>>Paolo Carlini wrote:
>>    
>>
>>>Are you willing to contribute a patch against the current mainline
>>>libstdc++-v3 sources for public discussion (that setlocale ...
>>>setlocale pattern is present in quite a few different places) ?
>>>      
>>>
>>Let me point out, however, that, assuming your analysis is correct (I
>>believe is) the solution cannot be as simple as you seems to assume:
>>the string returned by the first setlocale must be saved! 
>>    
>>
>That's not correct.  The first call with an empty string will set the 
>global locale object to that of the operating environment (eg. the 
>value of the LC_ALL environment variable in a POSIX environment).
>
>The remaining calls, with a NULL locale value, are simply queries.
>
/What/ exactly do you believe it's not correct? glibc2.2.5 docs? Takeshi 
analysis? Do you believe that Takeshi testcase must result in the 
reported behaviour, with a "C" locale at the end of program?
:-O
(by the way, sad to say ;-), but icc DTRT)

Paolo.


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