mirror of
https://github.com/ziglang/zig.git
synced 2025-12-27 08:33:15 +00:00
Fix long double on x86_64-windows
The larger alignment on this platform means that long double reports a sizeof 16 bytes, but it's underlying size is really just the 10 bytes of `f80` C doesn't give us a way to see the "underlying" size of a type, so this has to be caught by hand or by monitoring runtime memory. Luckily, x86 and x86-64 are the only platforms that seem to use a non-power-of-two type like this.
This commit is contained in:
parent
c96f85852e
commit
4ecc384f99
@ -6827,7 +6827,7 @@ pub const CType = enum {
|
||||
},
|
||||
.longlong, .ulonglong, .double => return 64,
|
||||
.longdouble => switch (target.abi) {
|
||||
.gnu, .gnuilp32, .cygnus => return 128,
|
||||
.gnu, .gnuilp32, .cygnus => return 80,
|
||||
else => return 64,
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user