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