1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 21:32:19 +00:00

Error messages shouldn't raise warnings about unused expressions by themselves.

This commit is contained in:
acqn 2020-08-30 01:31:23 +08:00 committed by Oliver Schmidt
parent 09e0e74124
commit dfba8d77ca

View File

@ -1301,6 +1301,7 @@ static void Primary (ExprDesc* E)
/* Statement block */
NextToken ();
Error ("Expression expected");
E->Flags |= E_EVAL_MAYBE_UNUSED;
hie0 (E);
if (CurTok.Tok == TOK_RCURLY) {
NextToken ();
@ -1332,6 +1333,7 @@ static void Primary (ExprDesc* E)
}
} else {
Error ("Expression expected");
E->Flags |= E_EVAL_MAYBE_UNUSED;
NextToken ();
}
}