From 766006c5e8e6a4a51f2cc7c173a2054bc219b9f4 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Tue, 3 Nov 2026 10:11:40 +0100 Subject: Fully support opaque types and forward decls --- src/prc1/print.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/prc1/print.c') diff --git a/src/prc1/print.c b/src/prc1/print.c index c40672d..2a2bfe3 100644 --- a/src/prc1/print.c +++ b/src/prc1/print.c @@ -58,15 +58,16 @@ static int settype(struct prv *p, const struct sym *s, struct prisym *ps) { const struct type *t = sym_type(p, s); const struct tk *tk = s->tk; + const struct sym *is; if (!t) { errloc(tk, "undefined reference to \"%s\"", tk->s); return -1; } - else if (inner(s)->type == SYM_LIT) + else if ((is = inner(s))->type == SYM_LIT) { - const struct lit *l = lit_push(tk, p); + const struct lit *l = lit_push(is->tk, p); if (!l) return -1; -- cgit v1.2.3