generate_c_size_and_align_checks: add __alignof check

This commit is contained in:
Evan Haas 2024-08-06 07:06:57 -07:00
parent b2dd0a669a
commit 679ad36fa0
No known key found for this signature in database

View File

@ -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),
});
}
}