Subject: CVS commit: src
To: None <source-changes@netbsd.org>
From: Christos Zoulas <christos@netbsd.org>
List: source-changes
Date: 11/23/1998 06:37:08
Module Name:	src
Committed By:	christos
Date:		Mon Nov 23 14:37:08 UTC 1998

Modified Files:
	src/usr.bin/xlint/lint1: cgram.y func.c
Log Message:
Unfortunately lint uses c-style comments as directives and these get parsed
at the lexical analysis stage not at the syntax parsing stage. The upshot
is that:
if (expr) {
stmt1;
}
/* LINTED */
stmt2;

stmt2 is the look-ahead token for the parser to choose between and if-then-else
statement as opposed to an if-then statement. Unfortunately the side effect
is that the LINTED directive gets reset before stmt2 gets parsed. We fix this,
by remembering the the linted directive during the if statement parsing and
restoring it at the appropriate time.