[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-20 Thread dannysmith at users dot sourceforge dot net
--- Comment #8 from dannysmith at users dot sourceforge dot net 2008-07-20 09:58 --- (In reply to comment #3) This is untested, but you get the idea. + setlocale(LC_ALL, POSIX); mingw's setlocale doesn't believe in POSIX ; it does however go to the ISO C89 church, and has

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-20 Thread kargl at gcc dot gnu dot org
--- Comment #9 from kargl at gcc dot gnu dot org 2008-07-20 17:44 --- (In reply to comment #8) (In reply to comment #3) This is untested, but you get the idea. + setlocale(LC_ALL, POSIX); mingw's setlocale doesn't believe in POSIX ; it does however go to the ISO C89

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-20 Thread jvdelisle at gcc dot gnu dot org
--- Comment #10 from jvdelisle at gcc dot gnu dot org 2008-07-21 04:45 --- Subject: Bug 36857 Author: jvdelisle Date: Mon Jul 21 04:44:10 2008 New Revision: 138021 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=138021 Log: 2008-07-20 Jerry DeLisle [EMAIL PROTECTED] PR

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-20 Thread jvdelisle at gcc dot gnu dot org
--- Comment #11 from jvdelisle at gcc dot gnu dot org 2008-07-21 04:56 --- Fixed on trunk -- jvdelisle at gcc dot gnu dot org changed: What|Removed |Added

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-19 Thread jvdelisle at gcc dot gnu dot org
--- Comment #2 from jvdelisle at gcc dot gnu dot org 2008-07-19 17:04 --- A simple fix would be to add a check for ',' or '.'. I can put a simple check in init options or main.c to set it at run time. -- jvdelisle at gcc dot gnu dot org changed: What|Removed

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-19 Thread kargl at gcc dot gnu dot org
--- Comment #3 from kargl at gcc dot gnu dot org 2008-07-19 18:28 --- This is untested, but you get the idea. Index: gcc/fortran/f95-lang.c === --- gcc/fortran/f95-lang.c (revision 137549) +++ gcc/fortran/f95-lang.c

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-19 Thread pav at iki dot fi
--- Comment #4 from pav at iki dot fi 2008-07-19 18:58 --- Does setting the locale to POSIX in the above patch fix the issue if the program using the runtime for example changes the locale just before calling a Fortran routine that does some printing? Also, does the locale change

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-19 Thread kargl at gcc dot gnu dot org
--- Comment #5 from kargl at gcc dot gnu dot org 2008-07-19 20:23 --- (In reply to comment #4) Does setting the locale to POSIX in the above patch fix the issue if the program using the runtime for example changes the locale just before calling a Fortran routine that does some

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-19 Thread jvdelisle at gcc dot gnu dot org
--- Comment #6 from jvdelisle at gcc dot gnu dot org 2008-07-19 23:14 --- I should clarify something here. At this time, gfortran does not have its own dtoa() function. We are using snprintf (or sprintf) to write to a char buffer. This is done to extract the digits. We then process

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-19 Thread jvdelisle at gcc dot gnu dot org
--- Comment #7 from jvdelisle at gcc dot gnu dot org 2008-07-19 23:36 --- The following fixes the reporters test case. You will notice that even with the locale set for a comma that the resulting formatted output from the test case has a '.' Index: write_float.def

[Bug libfortran/36857] Non-English locale breaks gfortran float formatting (printf is broken)

2008-07-16 Thread burnus at gcc dot gnu dot org
--- Comment #1 from burnus at gcc dot gnu dot org 2008-07-16 20:45 --- program main CALL badlocale() WRITE(*,'(G2.4)') 1.2345 end program main If the code executed correctly, the expected output would be 1,235 No, the expected output would be 1.235 according to the