diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
---|---|---|
committer | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
commit | 64d2a7c8945ba05af859901f5e248f1befdd8621 (patch) | |
tree | 013fcb7e9e3296ecdda876012252c36bd6bcb063 /src/cmd/cc/lexbody | |
parent | b901efe83e212f0c34c769c079e41373da12d723 (diff) | |
download | golang-64d2a7c8945ba05af859901f5e248f1befdd8621.tar.gz |
Imported Upstream version 1.2upstream/1.2
Diffstat (limited to 'src/cmd/cc/lexbody')
-rw-r--r-- | src/cmd/cc/lexbody | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/cc/lexbody b/src/cmd/cc/lexbody index f4a69739c..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; @@ -665,7 +665,7 @@ loop: goto pop; } fi.p = i->b + 1; - return i->b[0]; + return i->b[0] & 0xff; pop: iostack = i->link; @@ -678,7 +678,7 @@ pop: fi.c = i->c; if(--fi.c < 0) goto loop; - return *fi.p++; + return *fi.p++ & 0xff; } void @@ -762,7 +762,7 @@ ieeedtod(Ieee *ieee, double native) return; } fr = frexp(native, &exp); - f = 2097152L; /* shouldnt use fp constants here */ + f = 2097152L; /* shouldn't use fp constants here */ fr = modf(fr*f, &ho); ieee->h = ho; ieee->h &= 0xfffffL; @@ -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); } |