From eff929f0d323559f3b2e9272e3c1d4aa82fc5c80 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 12 Aug 2022 11:20:43 +0200 Subject: va list, cont fix --- bootstrap/types.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bootstrap/types.c') 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 }; -- cgit v1.2.3