aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-07-05 23:22:36 -0700
committerMichael Forney <mforney@mforney.org>2019-07-05 23:33:02 -0700
commit8b425349642dcebefa26541930235a302a51e657 (patch)
tree2d6fd57da597ea613df0957f5550a8b3568d1a2c
parent114623a84c8165d7bf2acc4ac1e912c2f69e2a7c (diff)
Specify function name in error message
-rw-r--r--qbe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qbe.c b/qbe.c
index f342723..46ba7e2 100644
--- a/qbe.c
+++ b/qbe.c
@@ -539,7 +539,7 @@ mkfunc(struct decl *decl, char *name, struct type *t, struct scope *s)
/* allocate space for parameters */
for (p = t->func.params; p; p = p->next) {
if (!p->name)
- error(&tok.loc, "parameter name omitted in function definition");
+ error(&tok.loc, "parameter name omitted in definition of function '%s'", name);
pt = t->func.isprototype ? p->type : typepromote(p->type, -1);
emittype(pt);
p->value = xmalloc(sizeof(*p->value));