Fix parsing of 64-bit integer constants on Windows.
(i.e., use the 64-bit unsigned integer parsing function, not the 64-bit signed one.) Fixes bug #68.
This commit is contained in:
2
lex.ll
2
lex.ll
@@ -156,7 +156,7 @@ L?\"(\\.|[^\\"])*\" { lStringConst(yylval, yylloc); return TOKEN_STRING_LITERAL;
|
|||||||
yylval->intVal = lParseBinary(yytext+2, *yylloc, &endPtr);
|
yylval->intVal = lParseBinary(yytext+2, *yylloc, &endPtr);
|
||||||
else {
|
else {
|
||||||
#if defined(ISPC_IS_WINDOWS) && !defined(__MINGW32__)
|
#if defined(ISPC_IS_WINDOWS) && !defined(__MINGW32__)
|
||||||
yylval->intVal = _strtoi64(yytext, &endPtr, 0);
|
yylval->intVal = _strtoui64(yytext, &endPtr, 0);
|
||||||
#else
|
#else
|
||||||
// FIXME: should use strtouq and then issue an error if we can't
|
// FIXME: should use strtouq and then issue an error if we can't
|
||||||
// fit into 64 bits...
|
// fit into 64 bits...
|
||||||
|
|||||||
Reference in New Issue
Block a user