From af617f24c5f2f2cab357ace9d822c6948c7e487f Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 31 Aug 2022 11:23:14 +0200 Subject: get close to self hosting (ack works) --- src/cffc.hff | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/cffc.hff') diff --git a/src/cffc.hff b/src/cffc.hff index 4d57d3d..d6de469 100644 --- a/src/cffc.hff +++ b/src/cffc.hff @@ -467,10 +467,12 @@ fn mkarrtype(len i64, konst bool, child *const Type) *const Type { }); } fn mkptrtype(child *const Type) *const Type { - return interntype(&Type { + let tmp typeof((Type{}).u) = :Ptr(child); + let ty = Type { g_targ.ptrsize, - .u: :Ptr(child) - }); + .u: tmp + }; + return interntype(&ty); } extern fn mkslicetype(child *const Type) *const Type; -- cgit v1.2.3