changeset 9489:940605ef6e9e

Don't abort if the 'long double' type has excess precision.
author Bruno Haible <bruno@clisp.org>
date Mon, 26 Nov 2007 21:13:57 +0100
parents 57c865858db0
children f1adb8aac374
files ChangeLog lib/vasnprintf.c
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-26  Bruno Haible  <bruno@clisp.org>
+
+	* lib/vasnprintf.c (decode_long_double): Don't abort if the
+	'long double' type has excess precision.
+	Reported by Jim Meyering in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2007-11/msg00120.html>.
+
 2007-11-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 	* doc/fdl.texi, doc/gpl-3.0.texi, doc/lgpl-3.0.texi:
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -871,8 +871,11 @@
 	abort ();
       m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo;
     }
+#if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess
+         precision.  */
   if (!(y == 0.0L))
     abort ();
+#endif
   /* Normalise.  */
   while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0)
     m.nlimbs--;