From a1e2a583b5b84ed77ea49d2fa528b7887d59d540 Mon Sep 17 00:00:00 2001 From: eck Date: Thu, 3 May 1990 16:18:22 +0000 Subject: [PATCH] fixed bug with double definition --- lang/cem/cemcom.ansi/idf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lang/cem/cemcom.ansi/idf.c b/lang/cem/cemcom.ansi/idf.c index 0681ddadd..58316a3ab 100644 --- a/lang/cem/cemcom.ansi/idf.c +++ b/lang/cem/cemcom.ansi/idf.c @@ -415,9 +415,10 @@ global_redecl(idf, new_sc, tp) */ register struct def *def = idf->id_def; - if (!equal_type(tp, def->df_type, 0)) + if (!equal_type(tp, def->df_type, 0)) { error("redeclaration of %s with different type", idf->id_text); - else update_proto(tp, def->df_type); + return; + } else update_proto(tp, def->df_type); if (tp->tp_fund == ARRAY) { /* Multiple array declaration; this may be interesting */ if (tp->tp_size < 0) { /* new decl has [] */ -- 2.34.1