Allow 64-bit constants when yylval.lval is 64 bits.
[jmk] --rw-rw-r-- M 137273 glenda sys 9186 Sep 21 08:56 sys/src/cmd/cc/lexbody
/n/sourcesdump/2005/0921/plan9/sys/src/cmd/cc/lexbody:342,350 -
/n/sourcesdump/2005/0922/plan9/sys/src/cmd/cc/lexbody:342,355
if(c == 'e' || c == 'E')
goto casee;
*cp = 0;
- yylval.lval = atol(symb);
+ if(sizeof(yylval.lval) == sizeof(vlong))
+ yylval.lval = strtoll(symb, nil, 10);
+ else
+ yylval.lval = strtol(symb, nil, 10);
ncu:
+ while(c == 'U' || c == 'u' || c == 'l' || c == 'L')
+ c = GETC();
peekc = c;
return LCONST;
[jmk] --rwxrwxr-x M 137273 rsc sys 115969 Sep 21 23:42 386/bin/8a
/sys/src/cmd/8a/a.y:yylex1
/sys/src/cmd/8a/a.y:yytokname
/sys/src/cmd/cc/lexbody:yylex
/sys/src/libc/fmt/fmt.c:_fmtinstall
/sys/src/libc/fmt/sprint.c:sprint
/sys/src/libc/port/pool.c:blocksetdsize
/sys/src/libc/port/pool.c:trim
/sys/src/libc/port/rune.c:chartorune
/sys/src/libc/port/strtol.c:strtol
|