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 2c173d25b04cfde067e3d4b32e4afc61e3e82b0b
parent 863fec184fdb150f4f8758cc68eb6a51f9a38dfe
Author: Michael Forney <mforney@mforney.org>
Date:   Sun, 17 Feb 2019 01:10:39 -0800

Ensure right number of arguments to non-prototype function definitions

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

diff --git a/expr.c b/expr.c @@ -461,7 +461,7 @@ postfixexpr(struct scope *s, struct expression *r) break; if (e->call.args) expect(TCOMMA, "or ')' after function call argument"); - if (!p && !t->func.isvararg && t->func.isprototype) + if (!p && !t->func.isvararg && t->func.paraminfo) error(&tok.loc, "too many arguments for function call"); *end = assignexpr(s); if (!t->func.isprototype || (t->func.isvararg && !p))