cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit 8b425349642dcebefa26541930235a302a51e657
parent 114623a84c8165d7bf2acc4ac1e912c2f69e2a7c
Author: Michael Forney <mforney@mforney.org>
Date:   Fri,  5 Jul 2019 23:22:36 -0700

Specify function name in error message

Diffstat:
Mqbe.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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));