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:
Matt Pharr
2012-01-26 10:53:56 -08:00
parent 1867b5b317
commit e612abe4ba

2
lex.ll
View File

@@ -156,7 +156,7 @@ L?\"(\\.|[^\\"])*\" { lStringConst(yylval, yylloc); return TOKEN_STRING_LITERAL;
yylval->intVal = lParseBinary(yytext+2, *yylloc, &endPtr);
else {
#if defined(ISPC_IS_WINDOWS) && !defined(__MINGW32__)
yylval->intVal = _strtoi64(yytext, &endPtr, 0);
yylval->intVal = _strtoui64(yytext, &endPtr, 0);
#else
// FIXME: should use strtouq and then issue an error if we can't
// fit into 64 bits...