aboutsummaryrefslogtreecommitdiffhomepage
path: root/lex.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-09-12 17:10:35 +0200
committerlemon <lsof@mailbox.org>2025-09-12 17:10:35 +0200
commit89710916cfa82f50be0092347744a5e06a3b5420 (patch)
tree02cff596fad2f6b4ea577ad35bc77d53dcb4a413 /lex.c
parentc8af181799015ea39b8868ef5d07b10ed255e799 (diff)
c: function-local static vars
Diffstat (limited to 'lex.c')
-rw-r--r--lex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lex.c b/lex.c
index 128233b..d17bef0 100644
--- a/lex.c
+++ b/lex.c
@@ -1241,7 +1241,7 @@ tryexpand(struct lexer *lx, struct token *tk)
}
joinspan(&span.ex, tk.span.ex);
if (narg < mac->nparam)
- error(&span, "not enough arguments in function-like macro invocation");
+ error(&excessspan, "macro `%s' passed %d arguments, but takes %d", mac->name, narg, mac->nparam);
else if (toomany) {
joinspan(&excessspan.ex, tk.span.ex);
error(&excessspan, "macro `%s' passed %d arguments, but takes just %d", mac->name, narg, mac->nparam);