From b1347283b907335297c90d295b4b8295035c98be Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 2 Aug 1989 11:26:51 +0000 Subject: [PATCH] Added warning for initializer of formal parameter (the syntax allows this!) --- lang/cem/cemcom/declar.g | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lang/cem/cemcom/declar.g b/lang/cem/cemcom/declar.g index dc24efdb3..a85827342 100644 --- a/lang/cem/cemcom/declar.g +++ b/lang/cem/cemcom/declar.g @@ -193,6 +193,8 @@ initializer(struct idf *idf; int sc;) error("illegal initialization of function"); idf->id_def->df_type->tp_fund = ERRONEOUS; } + if (level == L_FORMAL2) + warning("illegal initialization of formal parameter (ignored)"); } [ '=' -- 2.34.1