better (more restrained) error reporting

This commit is contained in:
dick
1989-10-30 16:19:35 +00:00
parent 2fb6605800
commit a817264e90
12 changed files with 46 additions and 112 deletions

View File

@@ -196,15 +196,7 @@ initializer(struct idf *idf; int sc;)
if (level == L_FORMAL2)
warning("illegal initialization of formal parameter (ignored)");
}
[
'='
|
empty
{warning("old-fashioned initialization, insert =");}
/* This causes trouble at declarator and at
external_definition, q.v.
*/
]
'=' /* used to be optional because of V6 */
{
#ifdef LINT
lint_statement();
@@ -247,10 +239,7 @@ declarator(register struct declarator *dc;)
}
:
primary_declarator(dc)
[%while(1) /* int i (M + 2) / 4;
is a function, not an
old-fashioned initialization.
*/
[
'('
formal_list(&fm) ? /* semantic check later... */
')'