aboutsummaryrefslogtreecommitdiff
path: root/src/cffc.hff
diff options
context:
space:
mode:
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;