frontend/define.c, ntharg(), #4/15 express some facts

This commit is contained in:
rlar 2015-11-07 20:22:42 +01:00
parent 71908ef194
commit f538b4dba3
1 changed files with 2 additions and 0 deletions

View File

@ -407,8 +407,10 @@ trcopy(struct pnode *tree, char *args, struct pnode *nn)
static struct pnode *
ntharg(int num, struct pnode *args)
{
// fact: num >= 1 for all known invocations of ntharg()
while (--num > 0) {
if (args && args->pn_op && (args->pn_op->op_num != PT_OP_COMMA)) {
// fact: num >= 1 because of `while' condition
if (num == 1)
break;
return NULL;