fix the type of value that is returned by bit-shift expression.

This commit is contained in:
crimsonwoods
2013-03-21 22:55:35 +09:00
parent f6646f44c2
commit 0292940e55
+4 -3
View File
@@ -580,7 +580,8 @@ lambda_body(codegen_scope *s, node *tree, int blk)
}
tree = tree->cdr;
if (tree->car) {
int ma, oa, ra, pa, ka, kd, ba, a;
int32_t a;
int ma, oa, ra, pa, ka, kd, ba;
int pos, i;
node *n, *opt;
@@ -595,8 +596,8 @@ lambda_body(codegen_scope *s, node *tree, int blk)
ka = kd = 0;
ba = tree->car->cdr->cdr->cdr->cdr ? 1 : 0;
a = ((ma & 0x1f) << 18)
| ((oa & 0x1f) << 13)
a = ((int32_t)(ma & 0x1f) << 18)
| ((int32_t)(oa & 0x1f) << 13)
| ((ra & 1) << 12)
| ((pa & 0x1f) << 7)
| ((ka & 0x1f) << 2)