This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/47007] Values from namelist file should not depend on locale settings


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 ...


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