This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


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

Java strtod.c patch


I never got around to checking this in.  Ok to do so?
Note this isn't quite the original patch I posted, which incorrectly
set s to s00 even if there was no error.

       * strtod.c (_strtod_r):  Used tLogic to check for missing digits
       after exponent had 'else' attached to wrong 'if'.

Index: java/lang/strtod.c
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/strtod.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 strtod.c
--- strtod.c	1999/04/07 14:52:39	1.1.1.1
+++ strtod.c	2001/10/08 18:15:23
@@ -242,16 +242,15 @@
 	      if (esign)
 		e = -e;
 	    }
-	  else
-	    {
-	      /* No exponent after an 'E' : that's an error. */
-	      ptr->_errno = EINVAL;
-	      e = 0;
-	      goto ret;
-	    }
 	}
       else
-	s = s00;
+	{
+	  /* No exponent after an 'E' : that's an error. */
+	  ptr->_errno = EINVAL;
+	  e = 0;
+	  s = s00;
+	  goto ret;
+	}
     }
   if (!nd)
     {


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