aboutsummaryrefslogtreecommitdiffhomepage
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/c.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/c/c.c b/c/c.c
index 3b7264e..4b421d5 100644
--- a/c/c.c
+++ b/c/c.c
@@ -4503,7 +4503,8 @@ tldecl(struct comp *cm)
error(&st.pspans[i], "parameter has incomplete type '%ty'", td->param[i]);
}
decl.isdef = 1;
- struct decl *d = &declsbuf.p[putdecl(cm, &decl)];
+ int idecl = putdecl(cm, &decl);
+ struct decl *d = &declsbuf.p[idecl];
struct function fn = { &cm->fnarena, .name = decl.name, .globl = d->scls != SCSTATIC, .fnty = decl.ty, .retty = td->ret };
irinit(&fn);
function(cm, &fn, st.pnames, st.pspans, st.pqual);