We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0d1682 commit 592f104Copy full SHA for 592f104
src/codegen/c.zig
@@ -2438,7 +2438,10 @@ pub const DeclGen = struct {
2438
const ty = val.typeOf(zcu);
2439
return .{ .data = .{
2440
.dg = dg,
2441
- .int_info = ty.intInfo(zcu),
+ .int_info = if (ty.zigTypeTag(zcu) == .@"union" and ty.containerLayout(zcu) == .@"packed")
2442
+ .{ .signedness = .unsigned, .bits = @intCast(ty.bitSize(zcu)) }
2443
+ else
2444
+ ty.intInfo(zcu),
2445
.kind = kind,
2446
.ctype = try dg.ctypeFromType(ty, kind),
2447
.val = val,
0 commit comments