aboutsummaryrefslogtreecommitdiff
path: root/src/prc1/print.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-11-03 10:11:40 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2026-11-03 10:11:40 +0100
commit766006c5e8e6a4a51f2cc7c173a2054bc219b9f4 (patch)
tree35c3991ca37ef3eed6666c63c2683ac5507b2a07 /src/prc1/print.c
parent3ee275dbb8bcf5df7f54e7659b4a9a8f4f49911d (diff)
downloadprc-766006c5e8e6a4a51f2cc7c173a2054bc219b9f4.tar.gz
Fully support opaque types and forward declsHEADmaster
Diffstat (limited to 'src/prc1/print.c')
-rw-r--r--src/prc1/print.c5
1 files changed, 3 insertions, 2 deletions
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;