diff options
| author | gingerBill <bill@gingerbill.org> | 2017-10-29 17:00:54 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-10-29 17:00:54 +0000 |
| commit | ae24a8e5ae77111cae24cd8d710b63636b737283 (patch) | |
| tree | 8e84ae6aaf163a2c8c1a835748aa3504f3f4948d /src/check_expr.cpp | |
| parent | d2588f9d1da112b48f4a3f224b643bdd8f47f429 (diff) | |
Fix pointer arithmetic; remove suffix #tags for proc types
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 4 |
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; } |