From ae24a8e5ae77111cae24cd8d710b63636b737283 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 29 Oct 2017 17:00:54 +0000 Subject: Fix pointer arithmetic; remove suffix #tags for proc types --- src/check_expr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/check_expr.cpp') 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; } -- cgit v1.2.3