mirror of
https://github.com/cc65/cc65.git
synced 2024-06-07 07:29:33 +00:00
NoCodeConstExpr() fix to avoid exessive error messages.
This commit is contained in:
parent
51d7c0f1eb
commit
fcbb4a5246
|
@ -4211,7 +4211,8 @@ ExprDesc NoCodeConstExpr (void (*Func) (ExprDesc*))
|
|||
if (!ED_IsConst (&Expr) || !ED_CodeRangeIsEmpty (&Expr)) {
|
||||
Error ("Constant expression expected");
|
||||
/* To avoid any compiler errors, make the expression a valid const */
|
||||
ED_MakeConstAbsInt (&Expr, 1);
|
||||
Expr.Flags &= E_MASK_RTYPE | E_MASK_KEEP_RESULT;
|
||||
Expr.Flags |= E_LOC_NONE;
|
||||
}
|
||||
|
||||
/* Return by value */
|
||||
|
|
Loading…
Reference in New Issue
Block a user