Now detects use before declaration, f.i. in

VAR k: REAL;
REAL : INTEGER;
This commit is contained in:
ceriel
1987-10-30 09:19:23 +00:00
parent 14b1915b8c
commit 042d501cf5
6 changed files with 31 additions and 12 deletions

View File

@@ -860,8 +860,8 @@ UseWarnings(df)
register t_def *df1 = df->imp_def;
df1->df_flags |= df->df_flags & (D_USED|D_DEFINED);
if (df->df_kind == D_IMPORT &&
!(df->df_flags & D_IMP_BY_EXP)) {
if (df->df_kind == D_INUSE) return;
if ( !(df->df_flags & D_IMP_BY_EXP)) {
if (! (df->df_flags & (D_USED | D_DEFINED))) {
node_warning(
df->df_scope->sc_end,