From 910316cfdeddd41fa23f72f4c8c136be15329fbc Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 3 Jul 2001 08:55:16 +0000 Subject: [PATCH] Fix: parameter name same as function name not dealt with properly --- lang/cem/cemcom.ansi/idf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lang/cem/cemcom.ansi/idf.c b/lang/cem/cemcom.ansi/idf.c index 8429fe036..59e225cb4 100644 --- a/lang/cem/cemcom.ansi/idf.c +++ b/lang/cem/cemcom.ansi/idf.c @@ -528,9 +528,15 @@ declare_formals(idf, fp) /* When one of the formals has the same name as the function, it hides the function def. Get it. */ - if (se && se->se_idf == idf) { - df = df->next; + while (se) { + if (se->se_idf == idf) { + df = df->next; + break; + } + se = se->next; } + + se = stack_level_of(L_FORMAL1)->sl_entry; hasproto = df->df_type->tp_proto != 0;