This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: iostream changes locale to format a number
- From: Stephen M.Webb <stephenw at cryptocard dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Fri, 3 May 2002 10:02:17 -0400
- Subject: Re: iostream changes locale to format a number
- References: <3CD27E4D.8010905@unitus.it> <20020503131051306.AAA1432@ns2.goodmedia.com@there> <3CD28F85.4090601@unitus.it>
- Reply-to: stephenw at cryptocard dot com
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