Module Name: src
Committed By: christos
Date: Fri Sep 26 15:26:01 UTC 2014
Modified Files:
src/usr.bin/xlint/lint1: cgram.y
Log Message:
oops I terminated the block too early (thanks unit tests!)
To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/usr.bin/xlint/lint1/cgram.y
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.66 src/usr.bin/xlint/lint1/cgram.y:1.67
--- src/usr.bin/xlint/lint1/cgram.y:1.66 Thu Sep 25 21:20:00 2014
+++ src/usr.bin/xlint/lint1/cgram.y Fri Sep 26 11:26:01 2014
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.66 2014/09/26 01:20:00 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.67 2014/09/26 15:26:01 christos Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.66 2014/09/26 01:20:00 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.67 2014/09/26 15:26:01 christos Exp $");
#endif
#include <stdlib.h>
@@ -1526,10 +1526,14 @@ iteration_stmnt:
| for_exprs stmnt {
CLRWFLGS(__FILE__, __LINE__);
for2();
+ popdecl();
+ blklev--;
}
| for_exprs error {
CLRWFLGS(__FILE__, __LINE__);
for2();
+ popdecl();
+ blklev--;
}
;
@@ -1564,14 +1568,10 @@ for_exprs:
c99ism(325);
for1(NULL, $6, $8);
CLRWFLGS(__FILE__, __LINE__);
- popdecl();
- blklev--;
}
| for_start opt_expr T_SEMI opt_expr T_SEMI opt_expr T_RPARN {
for1($2, $4, $6);
CLRWFLGS(__FILE__, __LINE__);
- popdecl();
- blklev--;
}
;