aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-01 14:23:46 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-01 14:23:46 +0100
commit0d4945dc8788e8aa134fbdbd0941d9a6db0b67bc (patch)
tree5344e3270f99746fdcee6237ebe768c1babfb822 /src/check_expr.c
parentfec6df65b3306005077ee6124458eaaf3ea7ce2c (diff)
Implement u128/i128 features; Add bits.odin
Diffstat (limited to 'src/check_expr.c')
-rw-r--r--src/check_expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check_expr.c b/src/check_expr.c
index a4a622341..2997cbbfb 100644
--- a/src/check_expr.c
+++ b/src/check_expr.c
@@ -2000,7 +2000,7 @@ bool check_representable_as_constant(Checker *c, ExactValue in_value, Type *type
case Basic_i16:
case Basic_i32:
case Basic_i64:
- // case Basic_i128:
+ case Basic_i128:
case Basic_int:
return i128_le(i128_neg(imax), i) && i128_le(i, i128_sub(imax, I128_ONE));
@@ -2008,7 +2008,7 @@ bool check_representable_as_constant(Checker *c, ExactValue in_value, Type *type
case Basic_u16:
case Basic_u32:
case Basic_u64:
- // case Basic_u128:
+ case Basic_u128:
case Basic_uint:
return !(u128_lt(u, U128_ZERO) || u128_gt(u, umax));
@@ -2338,7 +2338,7 @@ void check_shift(Checker *c, Operand *x, Operand *y, AstNode *node) {
}
i64 amount = i128_to_i64(y_val.value_integer);
- if (amount > 64) {
+ if (amount > 128) {
gbString err_str = expr_to_string(y->expr);
error_node(node, "Shift amount too large: `%s`", err_str);
gb_string_free(err_str);