Fix elaboration of void functions with no arguments (GitHub issue #281)

N.B. commit 82c8a495 incorrectly referenced issue #281. It should have
referenced issue #280.
This commit is contained in:
Martin Whitaker 2019-11-09 20:16:25 +00:00
parent a8f71d3c92
commit 9f712429c8
1 changed files with 2 additions and 1 deletions

View File

@ -3718,6 +3718,7 @@ expr_mintypmax
expression_list_with_nuls
: expression_list_with_nuls ',' expression
{ list<PExpr*>*tmp = $1;
if (tmp->empty()) tmp->push_back(0);
tmp->push_back($3);
$$ = tmp;
}
@ -3728,11 +3729,11 @@ expression_list_with_nuls
}
|
{ list<PExpr*>*tmp = new list<PExpr*>;
tmp->push_back(0);
$$ = tmp;
}
| expression_list_with_nuls ','
{ list<PExpr*>*tmp = $1;
if (tmp->empty()) tmp->push_back(0);
tmp->push_back(0);
$$ = tmp;
}