This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Java strtod.c patch
- To: java-patches at gcc dot gnu dot org
- Subject: Java strtod.c patch
- From: Per Bothner <per at bothner dot com>
- Date: Mon, 8 Oct 2001 11:49:30 -0700
- Cc: Mark Mitchell <mitchell at codesourcery dot com>
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)
{