[llvm-commits] [llvm] r44613 - /llvm/trunk/lib/Support/APFloat.cpp
Neil Booth
neil at daikokuya.co.uk
Wed Dec 5 05:01:27 PST 2007
Author: neil
Date: Wed Dec 5 07:01:24 2007
New Revision: 44613
URL: http://llvm.org/viewvc/llvm-project?rev=44613&view=rev
Log:
Handle zero correctly.
Modified:
llvm/trunk/lib/Support/APFloat.cpp
Modified: llvm/trunk/lib/Support/APFloat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=44613&r1=44612&r2=44613&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APFloat.cpp (original)
+++ llvm/trunk/lib/Support/APFloat.cpp Wed Dec 5 07:01:24 2007
@@ -231,8 +231,8 @@
is taken to have the decimal point after a single leading
non-zero digit.
- If the value is zero, V->firstSigDigit points to a zero, and the
- return exponent is zero.
+ If the value is zero, V->firstSigDigit points to a non-digit, and
+ the return exponent is zero.
*/
struct decimalInfo {
const char *firstSigDigit;
@@ -263,7 +263,7 @@
}
/* If number is all zerooes accept any exponent. */
- if (p != D->firstSigDigit) {
+ if (decDigitValue(*p) >= 10U) {
if (*p == 'e' || *p == 'E')
D->exponent = readExponent(p + 1);
More information about the llvm-commits
mailing list