This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47007] Values from namelist file should not depend on locale settings
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 19 Dec 2010 14:41:21 +0000
- Subject: [Bug fortran/47007] Values from namelist file should not depend on locale settings
- Auto-submitted: auto-generated
- References: <bug-47007-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47007
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.19 14:41:16
Ever Confirmed|0 |1
--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-19 14:41:16 UTC ---
I can reproduce this. It only occurs if one explicitly calls "setlocale" - as
by default the locale for C programs is "LC_ALL=C", which works.
As the locale can be change all the time, one would need to do:
char *cur_locale;
cur_local = setlocale(LC_NUMERIC, NULL);
setlocale(LC_NUMERIC, "");
...
setlocale(LC_NUMERIC, cur_locale);
around each and every READ transfer statement ...