ref: 916a4ec745ac099b0747c94c0def75c54e6a005f
parent: e60ffe8d64ff9670fdf5ac0efb7fd64ff08af8bc
author: Quentin Rameau <quinq@fifth.space>
date: Tue Mar 7 07:03:25 EST 2017
[cc1] Fix limits checking in functions declaration
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -351,7 +351,7 @@
Type *type);
static int
-krargs(Symbol *pars[], unsigned *nparsp)
+krpars(Symbol *pars[], unsigned *nparsp)
{
Symbol *sym;
int toomany = 0;
@@ -367,7 +367,7 @@
yylval.sym->name);
continue;
}
- if (npars < NR_FUNARG) {
+ if (npars < NR_FUNPARAM) {
++npars;
*pars++ = sym;
continue;
@@ -388,7 +388,7 @@
if (yytoken != ')')
- toomany = krargs(pars, nparsp);
+ toomany = krpars(pars, nparsp);
else
*nparsp = 0;
@@ -434,7 +434,7 @@
}
if (sym) {
- if (npars == NR_FUNARG) {
+ if (npars == NR_FUNPARAM) {
toomany = 1;
} else {
npars++;