aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/types.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-12 11:20:43 +0200
committerlemon <lsof@mailbox.org>2022-08-12 11:20:43 +0200
commiteff929f0d323559f3b2e9272e3c1d4aa82fc5c80 (patch)
treec3dd54fe4ed4a3082f455c8fe37436f767760977 /bootstrap/types.c
parent19f1093f0929b989a06cdee2e7d175e6db15559c (diff)
va list, cont fix
Diffstat (limited to 'bootstrap/types.c')
-rw-r--r--bootstrap/types.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bootstrap/types.c b/bootstrap/types.c
index 9118392..66ae840 100644
--- a/bootstrap/types.c
+++ b/bootstrap/types.c
@@ -36,7 +36,7 @@ hashtype(const struct type *ty) {
epri("");
switch (ty->t) {
- case TYvoid: case TYbool:
+ case TYvoid: case TYbool: case TYvalist:
break;
case TYint: case TYfloat:
h = fnv1az(h, ty->size);
@@ -75,7 +75,7 @@ typeeql(const struct type *lhs, const struct type *rhs) {
if (lhs->t != rhs->t || lhs->konst != rhs->konst)
return 0;
switch (lhs->t) {
- case TYvoid: case TYbool:
+ case TYvoid: case TYbool: case TYvalist:
return 1;
case TYfloat:
return lhs->size == rhs->size;
@@ -206,7 +206,7 @@ const struct type
*ty_iptrint, *ty_uptrint, *ty_c_int, *ty_c_uint,
*ty_c_char, *ty_c_schar, *ty_c_uchar, *ty_c_short,
*ty_c_ushort, *ty_c_long, *ty_c_ulong, *ty_c_llong,
- *ty_c_ullong;
+ *ty_c_ullong, *ty_valist;
void
putprimtypes(struct env *env) {
@@ -248,6 +248,7 @@ putprimtypes(struct env *env) {
{"c_ulong", &ty_c_ulong, {TYint, t.longsize, IU}},
{"c_llong", &ty_c_llong, {TYint, t.llongsize, IS}},
{"c_ullong", &ty_c_ullong, {TYint, t.llongsize, IU}},
+ {"va_list", &ty_valist, {TYvalist, t.valistsize, t.valistalign}},
#undef IS
#undef IU
};