Fix a bug in dtoa on gcc

Discovered in https://github.com/miloyip/dtoa-benchmark/issues/1 with
assertion fail.
This commit is contained in:
miloyip 2014-09-07 15:20:09 +08:00
parent c4a1566a4e
commit d0f98d2da1

View File

@ -105,7 +105,7 @@ struct DiyFp {
_BitScanReverse64(&index, f);
return DiyFp(f << (63 - index), e - (63 - index));
#elif defined(__GNUC__)
int s = __builtin_clzll(f) + 1;
int s = __builtin_clzll(f);
return DiyFp(f << s, e - s);
#else
DiyFp res = *this;