This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/36857] Non-English locale breaks gfortran float formatting ("printf is broken")
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2008 23:36:10 -0000
- Subject: [Bug libfortran/36857] Non-English locale breaks gfortran float formatting ("printf is broken")
- References: <bug-36857-16480@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla 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
===================================================================
--- write_float.def (revision 137760)
+++ write_float.def (working copy)
@@ -123,7 +123,8 @@ output_float (st_parameter_dt *dtp, cons
*/
/* Check the given string has punctuation in the correct places. */
- if (d != 0 && (buffer[2] != '.' || buffer[ndigits + 2] != 'e'))
+ if (d != 0 && ((buffer[2] != '.' && buffer[2] != ',')
+ || buffer[ndigits + 2] != 'e'))
internal_error (&dtp->common, "printf is broken");
/* Read the exponent back in. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36857