1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00

Fixed '&function' and '&array'.

This commit is contained in:
acqn 2020-07-17 15:10:27 +08:00 committed by Oliver Schmidt
parent d23b577331
commit 9198b3be00

View File

@ -1841,9 +1841,12 @@ void hie10 (ExprDesc* Expr)
/* Do it anyway, just to avoid further warnings */
Expr->Flags &= ~E_BITFIELD;
}
/* It's allowed in C to take the address of an array this way */
if (!IsTypeFunc (Expr->Type) && !IsTypeArray (Expr->Type)) {
/* The & operator yields an rvalue address */
ED_AddrExpr (Expr);
}
Expr->Type = PointerTo (Expr->Type);
/* The & operator yields an rvalue address */
ED_AddrExpr (Expr);
}
break;