summaryrefslogtreecommitdiff
path: root/parse/type.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse/type.c')
-rw-r--r--parse/type.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/parse/type.c b/parse/type.c
index 392161c..10c704a 100644
--- a/parse/type.c
+++ b/parse/type.c
@@ -18,6 +18,7 @@ struct Typename {
};
Type **tytab = NULL;
+Type **types = NULL;
size_t ntypes;
Cstr **cstrtab;
size_t ncstrs;
@@ -36,6 +37,10 @@ Type *mktype(int line, Ty ty)
t->line = line;
tytab = xrealloc(tytab, ntypes*sizeof(Type*));
tytab[t->tid] = NULL;
+ types = xrealloc(types, ntypes*sizeof(Type*));
+ types[t->tid] = t;
+ if (ty <= Tyvalist) /* the last builtin atomic type */
+ t->vis = Visbuiltin;
for(i = 0; tycstrs[ty][i]; i++)
setcstr(t, tycstrs[ty][i]);