| ... | @@ -45,11 +45,11 @@ pub fn main() !void { | ... | @@ -45,11 +45,11 @@ pub fn main() !void { |
| 45 | const stdout = std.io.getStdOut().writer(); | 45 | const stdout = std.io.getStdOut().writer(); |
| 46 | inline for (@typeInfo(std.Target.CType).Enum.fields) |field| { | 46 | inline for (@typeInfo(std.Target.CType).Enum.fields) |field| { |
| 47 | const c_type: std.Target.CType = @enumFromInt(field.value); | 47 | const c_type: std.Target.CType = @enumFromInt(field.value); |
| 48 | try stdout.print("_Static_assert(sizeof({s}) == {d}, \"\");\n", .{ | 48 | try stdout.print("_Static_assert(sizeof({0s}) == {1d}, \"sizeof({0s}) == {1d}\");\n", .{ |
| 49 | c_name(c_type), | 49 | c_name(c_type), |
| 50 | target.c_type_byte_size(c_type), | 50 | target.c_type_byte_size(c_type), |
| 51 | }); | 51 | }); |
| 52 | try stdout.print("_Static_assert(_Alignof({s}) == {d}, \"\");\n\n", .{ | 52 | try stdout.print("_Static_assert(_Alignof({0s}) == {1d}, \"_Alignof({0s}) == {1d}\");\n\n", .{ |
| 53 | c_name(c_type), | 53 | c_name(c_type), |
| 54 | target.c_type_alignment(c_type), | 54 | target.c_type_alignment(c_type), |
| 55 | }); | 55 | }); |