mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-13 22:15:36 -04:00
Fix pointer arithmetic; remove suffix #tags for proc types
This commit is contained in:
1 parent
d2588f9d1d
commit
ae24a8e5ae
4 files changed
+18
-67
No files matched your search
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user