authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-19 06:58:23+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-19 06:58:23+02:00
logc0cc0f5991abbe2cadc769b2a87be105be681181
tree1dc78c3c43a12f2f8383fd64987c42f8401382ad
parentce95ea11132b0800959b4fe991cb9566f35143e4
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: fix cTypeBitSize() for ez80-freestanding

It was incorrectly using the generic prong. Just throw tios in the same OS prong as freestanding and ashetos.

1 files changed, 8 insertions(+), 8 deletions(-)

lib/std/Target.zig+8-8
......@@ -3232,6 +3232,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
32323232 .freestanding,
32333233 .other,
32343234 .ashetos,
3235 .tios,
32353236 => switch (target.cpu.arch) {
32363237 .msp430,
32373238 .x86_16,
......@@ -3254,6 +3255,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
32543255 .long, .ulong, .float => 32,
32553256 .double, .longdouble, .longlong, .ulonglong => 64,
32563257 },
3258 .ez80 => switch (c_type) {
3259 .char => 8,
3260 .short, .ushort => 16,
3261 .int, .uint => 24,
3262 .long, .ulong, .float, .double => 32,
3263 .longlong, .ulonglong, .longdouble => 64,
3264 },
32573265 else => switch (c_type) {
32583266 .char => 8,
32593267 .short, .ushort => 16,
......@@ -3475,14 +3483,6 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
34753483 .longdouble => 80,
34763484 },
34773485
3478 .tios => switch (c_type) {
3479 .char => 8,
3480 .short, .ushort => 16,
3481 .int, .uint => 24,
3482 .long, .ulong, .float, .double => 32,
3483 .longlong, .ulonglong, .longdouble => 64,
3484 },
3485
34863486 .opengl => null,
34873487 };
34883488}