(stmt): Don't give more than one error message if a nested `if' has an

empty body.

From-SVN: r7722
This commit is contained in:
Richard Kenner 1994-07-11 18:17:57 -04:00
parent 4843c18526
commit 218d0f8a84

View file

@ -1680,8 +1680,9 @@ stmt:
{ expand_end_cond ();
/* This warning is here instead of in simple_if, because we
do not want a warning if an empty if is followed by an
else statement. */
if (extra_warnings && stmt_count == $<itype>1)
else statement. Increment stmt_count so we don't
give a second error if this is a nested `if'. */
if (extra_warnings && stmt_count++ == $<itype>1)
warning_with_file_and_line (if_stmt_file, if_stmt_line,
"empty body in an if-statement"); }
/* Make sure expand_end_cond is run once