authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-16 22:05:20+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-17 05:22:34+02:00
log3603f90fa7a3740057d00f51e46e20972d297ba0
tree5daccffeabc2c35d3189532b662bcb7ec1b5548f
parentd1e76ee276ea6122498d0dca50940424e3d7ce9f
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: fix cTypeByteSize(.longdouble) when cTypeBitSize(.longdouble) == 32

This occurs on AVR.

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

lib/std/Target.zig+1
...@@ -3216,6 +3216,7 @@ pub fn cTypeByteSize(t: *const Target, c_type: CType) ?u16 {...@@ -3216,6 +3216,7 @@ pub fn cTypeByteSize(t: *const Target, c_type: CType) ?u16 {
3216 => @divExact(cTypeBitSize(t, c_type) orelse return null, 8),3216 => @divExact(cTypeBitSize(t, c_type) orelse return null, 8),
32173217
3218 .longdouble => switch (cTypeBitSize(t, c_type) orelse return null) {3218 .longdouble => switch (cTypeBitSize(t, c_type) orelse return null) {
3219 32 => 4,
3219 64 => 8,3220 64 => 8,
3220 80 => @intCast(std.mem.alignForward(usize, 10, cTypeAlignment(t, c_type).?)),3221 80 => @intCast(std.mem.alignForward(usize, 10, cTypeAlignment(t, c_type).?)),
3221 128 => 16,3222 128 => 16,