From 63604024f47767b7b0c0deba5c9647cd6c040931 Mon Sep 17 00:00:00 2001 From: mlugg Date: Sun, 11 Jun 2023 13:15:37 +0100 Subject: stage2: fix InternPool compile errors on 32-bit targets --- src/codegen/c.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen') diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 7b091d6823..8d2ba2bbb8 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -642,7 +642,7 @@ pub const DeclGen = struct { // Ensure complete type definition is visible before accessing fields. _ = try dg.typeToIndex(base_ty, .complete); const field_ty = switch (mod.intern_pool.indexToKey(base_ty.toIntern())) { - .anon_struct_type, .struct_type, .union_type => base_ty.structFieldType(field.index, mod), + .anon_struct_type, .struct_type, .union_type => base_ty.structFieldType(@intCast(usize, field.index), mod), .ptr_type => |ptr_type| switch (ptr_type.flags.size) { .One, .Many, .C => unreachable, .Slice => switch (field.index) { -- cgit v1.2.3