aboutsummaryrefslogtreecommitdiff
path: root/src/cffc.hff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-31 11:23:14 +0200
committerlemon <lsof@mailbox.org>2022-08-31 11:23:14 +0200
commitaf617f24c5f2f2cab357ace9d822c6948c7e487f (patch)
tree196657ff59552219e7928b7bba300ee2c540b354 /src/cffc.hff
parentf1d4407044b5cd5eaabf0a53d1d7cb5d8b270ea6 (diff)
get close to self hosting (ack works)
Diffstat (limited to 'src/cffc.hff')
-rw-r--r--src/cffc.hff8
1 files changed, 5 insertions, 3 deletions
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;