mirror of
https://github.com/cc65/cc65.git
synced 2025-02-05 20:31:53 +00:00
Fixed deferred post-inc and post-dec in unevaluated context such as 'sizeof(i++)'.
This commit is contained in:
parent
bb3a2db5a0
commit
eadaf2fef8
@ -376,6 +376,9 @@ void DoneDeferredOps (void)
|
||||
static void DeferInc (const ExprDesc* Expr)
|
||||
/* Defer the post-inc and put it in a queue */
|
||||
{
|
||||
if (ED_IsUneval (Expr)) {
|
||||
return;
|
||||
}
|
||||
DeferredOp* Op = xmalloc (sizeof (DeferredOp));
|
||||
memcpy (&Op->Expr, Expr, sizeof (ExprDesc));
|
||||
Op->OpType = DOT_INC;
|
||||
@ -387,6 +390,9 @@ static void DeferInc (const ExprDesc* Expr)
|
||||
static void DeferDec (const ExprDesc* Expr)
|
||||
/* Defer the post-dec and put it in a queue */
|
||||
{
|
||||
if (ED_IsUneval (Expr)) {
|
||||
return;
|
||||
}
|
||||
DeferredOp* Op = xmalloc (sizeof (DeferredOp));
|
||||
memcpy (&Op->Expr, Expr, sizeof (ExprDesc));
|
||||
Op->OpType = DOT_DEC;
|
||||
|
Loading…
x
Reference in New Issue
Block a user