Fix pointer arithmetic; remove suffix #tags for proc types

This commit is contained in:
gingerBill
2017-10-29 17:00:54 +00:00
parent d2588f9d1d
commit ae24a8e5ae
4 changed files with 18 additions and 67 deletions

View File

@@ -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;
}