aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-10-29 17:00:54 +0000
committergingerBill <bill@gingerbill.org>2017-10-29 17:00:54 +0000
commitae24a8e5ae77111cae24cd8d710b63636b737283 (patch)
tree8e84ae6aaf163a2c8c1a835748aa3504f3f4948d /src/check_expr.cpp
parentd2588f9d1da112b48f4a3f224b643bdd8f47f429 (diff)
Fix pointer arithmetic; remove suffix #tags for proc types
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 02c4fbf64..c22d59da0 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -3239,7 +3239,7 @@ bool check_builtin_procedure(Checker *c, Operand *operand, AstNode *call, i32 id
case BuiltinProc_offset_of: {
- // proc offset_of(Type, field) -> untyped int
+ // proc offset_of(Type, field) -> uintptr
Operand op = {};
Type *bt = check_type(c, ce->args[0]);
Type *type = base_type(bt);
@@ -3279,7 +3279,7 @@ bool check_builtin_procedure(Checker *c, Operand *operand, AstNode *call, i32 id
operand->mode = Addressing_Constant;
operand->value = exact_value_i64(type_offset_of_from_selection(c->allocator, type, sel));
- operand->type = t_untyped_integer;
+ operand->type = t_uintptr;
break;
}