mirror of
https://github.com/ziglang/zig.git
synced 2025-12-28 00:53:18 +00:00
type: give empty unions 1-byte alignment
Zero-byte alignment is no longer valid for runtime types. I made most of these changes in an earlier commit, but missed this case.
This commit is contained in:
parent
d3f3de73ba
commit
9965d960b5
@ -1051,9 +1051,7 @@ pub const Type = struct {
|
||||
if (union_obj.hasTag(ip)) {
|
||||
return abiAlignmentAdvanced(union_obj.enum_tag_ty.toType(), mod, strat);
|
||||
} else {
|
||||
return .{
|
||||
.scalar = Alignment.fromByteUnits(@intFromBool(union_obj.flagsPtr(ip).layout == .Extern)),
|
||||
};
|
||||
return .{ .scalar = .@"1" };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user