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


On May 3, 2002 09:24 am, Paolo Carlini wrote:
>
> /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?

Takeshi's code shows a bug in GCC 3.1, in that writing to cout 
unexpectedly changes the value of the global POSIX locale.  His code is 
correct and does not need to be changed.

The good news is that this is not a problem in the CVS code. The fix 
for this went in some time after whomever made the snapshot RPM that 
Takeshi used.

In short, this does not appear to be a bug in either 3.1 or the 
mainline.  Unfortunately I can't confirm it because I seem to have 
broken the XPG4 support in my system and I core on anything but the C 
locale now.

Takeshi's code could be wrapped into a nice test case for the test 
suite, if someone with a working XPG4 feels like doing it.

-- 
Stephen M. Webb


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