mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
generate_c_size_and_align_checks: add __alignof check
This commit is contained in:
parent
b2dd0a669a
commit
679ad36fa0
@ -53,5 +53,9 @@ pub fn main() !void {
|
||||
c_name(c_type),
|
||||
target.c_type_alignment(c_type),
|
||||
});
|
||||
try stdout.print("_Static_assert(__alignof({0s}) == {1d}, \"__alignof({0s}) == {1d}\");\n\n", .{
|
||||
c_name(c_type),
|
||||
target.c_type_preferred_alignment(c_type),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user