compiler: fix an ICE when parsing 0xdie, reject token 0x123i.
The lexer used to incorrectly accept a token like 0x123i and interpreted it as 123i. It also used to die when encountering 0xdie. From-SVN: r187266
This commit is contained in:
parent
ca30ba74c9
commit
62beea506b
|
@ -1012,7 +1012,9 @@ Lex::gather_number()
|
|||
}
|
||||
}
|
||||
|
||||
if (*p != '.' && *p != 'i' && !Lex::could_be_exponent(p, pend))
|
||||
// A partial token that looks like an octal literal might actually be the
|
||||
// beginning of a floating-point or imaginary literal.
|
||||
if (base == 16 || (*p != '.' && *p != 'i' && !Lex::could_be_exponent(p, pend)))
|
||||
{
|
||||
std::string s(pnum, p - pnum);
|
||||
mpz_t val;
|
||||
|
|
Loading…
Reference in New Issue