mirror of
https://github.com/ziglang/zig.git
synced 2025-12-22 22:23:10 +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),
|
c_name(c_type),
|
||||||
target.c_type_alignment(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…
x
Reference in New Issue
Block a user