aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/types.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-15 08:48:17 +0200
committerlemon <lsof@mailbox.org>2022-08-15 08:48:17 +0200
commitf802bb99263aaa5be492999babd44cd2fdb1c65f (patch)
tree233db41c788043913dae46af3483a3443fec5ffe /bootstrap/types.c
parent91c3058ed332378c80ee337a2d834dfc7a4407e6 (diff)
align fix
Diffstat (limited to 'bootstrap/types.c')
-rw-r--r--bootstrap/types.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/bootstrap/types.c b/bootstrap/types.c
index 0be365f..dce85a6 100644
--- a/bootstrap/types.c
+++ b/bootstrap/types.c
@@ -225,27 +225,22 @@ putprimtypes(struct env *env) {
{"f64", &ty_f64, {TYfloat, 8, t.f64align}},
#define IS .int_signed = 1
#define IU .int_signed = 0
+#define A(t) _Alignof(t)
{"i8", &ty_i8, {TYint, 1, 1, IS}},
{"u8", &ty_u8, {TYint, 1, 1, IU}},
{"i16", &ty_i16, {TYint, 2, 2, IS}},
{"u16", &ty_u16, {TYint, 2, 2, IU}},
- {"i32", &ty_i32, {TYint, 4, 4, IS}},
- {"u32", &ty_u32, {TYint, 4, 4, IU}},
- {"i64", &ty_i64, {TYint, 8, 8, IS}},
- {"u64", &ty_u64, {TYint, 8, 8, IU}},
+ {"i32", &ty_i32, {TYint, 4, t.i32align, IS}},
+ {"u32", &ty_u32, {TYint, 4, t.i32align, IU}},
+ {"i64", &ty_i64, {TYint, 8, t.i64align, IS}},
+ {"u64", &ty_u64, {TYint, 8, t.i64align, IU}},
{"int", &ty_int, {TYint, t.intsize, IS}},
{"uint", &ty_uint, {TYint, t.intsize, IU}},
{"isize", &ty_isize, {TYint, t.sizesize, IS}},
{"usize", &ty_usize, {TYint, t.sizesize, IU}},
{"iptrint", &ty_iptrint, {TYint, t.ptrsize, IS}},
{"uptrint", &ty_uptrint, {TYint, t.ptrsize, IU}},
- {"c_int", &ty_c_int, {TYint, t.intsize, IS}},
- {"c_uint", &ty_c_uint, {TYint, t.intsize, IU}},
{"c_char", &ty_c_char, {TYint, 1, .int_signed = t.charsigned}},
- {"c_schar", &ty_c_schar, {TYint, 1, IS}},
- {"c_uchar", &ty_c_uchar, {TYint, 1, IU}},
- {"c_short", &ty_c_short, {TYint, 2, IS}},
- {"c_ushort", &ty_c_ushort, {TYint, 2, IU}},
{"c_long", &ty_c_long, {TYint, t.longsize, IS}},
{"c_ulong", &ty_c_ulong, {TYint, t.longsize, IU}},
{"c_llong", &ty_c_llong, {TYint, t.llongsize, IS}},