$$ = new If ((Expression) $3, (Statement) $5, l);
- if (RootContext.WarningLevel >= 4){
+ if (RootContext.WarningLevel >= 3){
+ // FIXME: location for warning should be loc property of $5.
if ($5 == EmptyStatement.Value)
Report.Warning (642, l, "Possible mistaken empty statement");
}
Location l = (Location) $1;
$$ = new If ((Expression) $3, (Statement) $5, (Statement) $7, l);
+
+ if (RootContext.WarningLevel >= 3){
+ // FIXME: location for warning should be loc property of $5 and $7.
+ if ($5 == EmptyStatement.Value)
+ Report.Warning (642, l, "Possible mistaken empty statement");
+ if ($7 == EmptyStatement.Value)
+ Report.Warning (642, l, "Possible mistaken empty statement");
+ }
}
;
{
Location l = (Location) $1;
$$ = new While ((Expression) $3, (Statement) $5, l);
-
- if (RootContext.WarningLevel >= 4){
- if ($5 == EmptyStatement.Value)
- Report.Warning (642, l, "Possible mistaken empty statement");
- }
}
;
For f = new For ((Statement) $5, (Expression) $6, (Statement) $8, (Statement) $10, l);
- if (RootContext.WarningLevel >= 4){
- if ($10 == EmptyStatement.Value)
- Report.Warning (642, (Location) $4, "Possible mistaken empty statement");
- }
-
current_block.AddStatement (f);
while (current_block.Implicit)
current_block = current_block.Parent;
Fixed f = new Fixed ((Expression) $3, (ArrayList) $4, (Statement) $7, l);
- if (RootContext.WarningLevel >= 4){
- if ($7 == EmptyStatement.Value)
- Report.Warning (642, l, "Possible mistaken empty statement");
- }
-
current_block.AddStatement (f);
while (current_block.Implicit)
current_block = current_block.Parent;