Fix parsing of binary floating point number

* tccpp.c (parse_number): `shift' should be 1 while parsing binary
floating point number.
* tests/tests2/70_floating_point_literals.c: New test cases for
floating point number parsing.
This commit is contained in:
Lee Duhem
2014-12-15 16:32:08 +08:00
parent 20a5845a47
commit 5a76c5d2f3
4 changed files with 133 additions and 2 deletions

View File

@ -1874,7 +1874,7 @@ static void parse_number(const char *p)
if (b == 16)
shift = 4;
else
shift = 2;
shift = 1;
bn_zero(bn);
q = token_buf;
while (1) {