diff options
author | Michael Forney <mforney@mforney.org> | 2019-02-17 01:10:39 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-02-17 01:10:39 -0800 |
commit | 2c173d25b04cfde067e3d4b32e4afc61e3e82b0b (patch) | |
tree | 99568f772feb1f1bd8c53bb2c2103ed6bcba1aed | |
parent | 863fec184fdb150f4f8758cc68eb6a51f9a38dfe (diff) | |
download | cproc-2c173d25b04cfde067e3d4b32e4afc61e3e82b0b.tar.xz |
Ensure right number of arguments to non-prototype function definitions
-rw-r--r-- | expr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) |