From 3603f90fa7a3740057d00f51e46e20972d297ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 16 Oct 2026 22:05:20 +0200 Subject: [PATCH] std.Target: fix cTypeByteSize(.longdouble) when cTypeBitSize(.longdouble) == 32 This occurs on AVR. --- lib/std/Target.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index fc2f550586ca6c4c7cb5cffcd72fb29672a87cb9..486bacf822a6559a53fe15bb97b87a562ba620f3 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -3216,6 +3216,7 @@ pub fn cTypeByteSize(t: *const Target, c_type: CType) ?u16 { => @divExact(cTypeBitSize(t, c_type) orelse return null, 8), .longdouble => switch (cTypeBitSize(t, c_type) orelse return null) { + 32 => 4, 64 => 8, 80 => @intCast(std.mem.alignForward(usize, 10, cTypeAlignment(t, c_type).?)), 128 => 16, -- 2.54.0