This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/24856] call to setlocale doesn't return expected value
- From: "tedoc2000 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Nov 2005 19:55:44 -0000
- Subject: [Bug c/24856] call to setlocale doesn't return expected value
- References: <bug-24856-11711@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from tedoc2000 at gmail dot com 2005-11-14 19:55 -------
I have a very simple program that is trying to call setlocale(LC_ALL,"") to set
the LC_ALL from the enviroment.
When I run with a gcc3.3.2 compiled binary:
gcc33> ./locale
en_US en_US en_US en_US en_US en_US
en_US en_US en_US en_US en_US en_US
But when I run with gcc 3.4.4 compiled binary I get:
gcc34> ./locale
null
C C C C C C
In both cases I have:
> echo $LANG
en_US
> echo $LC_ALL
The .i files look the same to me except for white space differences
Here is the -v output from the gcc 3.3.2 version:
/opt/OPSWgcc32/bin/gcc -v
Reading specs from
/opt/OPSWgcc32/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/3.3.2/specs
Configured with: ../configure --with-ar=/usr/bin/ar --with-as=/usr/bin/as
--with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++
--prefix=/opt/OPSWgcc32 --enable-threads --enable-version-specific-runtime-libs
--host=powerpc-ibm-aix4.3.2.0
Thread model: aix
gcc version 3.3.2
And here is the 3.4.4 version:
Reading specs from
/opt/OPSWbuildtools/1.0.1/lib/gcc/powerpc-ibm-aix4.3.2.0/3.4.4/specs
Configured with: ../gcc-3.4.4/configure --disable-shared --with-as=/bin/as
--with-ld=/bin/ld --disable-nls --enable-threads=posix
--with-libiconv-prefix=/opt/OPSWbuildtools/1.0.1
--prefix=/opt/OPSWbuildtools/1.0.1
--with-local-prefix=/opt/OPSWbuildtools/1.0.1
--enable-version-specific-runtime-libs --enable-languages=c,c++
Thread model: aix
gcc version 3.4.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24856