summaryrefslogtreecommitdiff
path: root/src/cmd/cc/lexbody
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/cc/lexbody')
-rw-r--r--src/cmd/cc/lexbody8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/cc/lexbody b/src/cmd/cc/lexbody
index ccc0c405d..9d293b089 100644
--- a/src/cmd/cc/lexbody
+++ b/src/cmd/cc/lexbody
@@ -224,7 +224,7 @@ Sym*
lookup(void)
{
Sym *s;
- int32 h;
+ uint32 h;
char *p;
int c, l;
char *r, *w;
@@ -400,7 +400,7 @@ l1:
if(c >= '0' && c <= '9') {
if(c > '7' && c1 == 3)
break;
- yylval.lval <<= c1;
+ yylval.lval = (uvlong)yylval.lval << c1;
yylval.lval += c - '0';
c = GETC();
continue;
@@ -410,7 +410,7 @@ l1:
if(c >= 'A' && c <= 'F')
c += 'a' - 'A';
if(c >= 'a' && c <= 'f') {
- yylval.lval <<= c1;
+ yylval.lval = (uvlong)yylval.lval << c1;
yylval.lval += c - 'a' + 10;
c = GETC();
continue;
@@ -770,6 +770,6 @@ ieeedtod(Ieee *ieee, double native)
f = 65536L;
fr = modf(fr*f, &ho);
ieee->l = ho;
- ieee->l <<= 16;
+ ieee->l = (uint32)ieee->l << 16;
ieee->l |= (int32)(fr*f);
}