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 libfortran/36857] Non-English locale breaks gfortran float formatting ("printf is broken")



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


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