Explicit z: should suppress "Suspicious address expression" warning #194

This commit is contained in:
bbbradsmith
2023-05-03 01:01:21 -04:00
parent 805e98a7aa
commit 65f773f5ee
3 changed files with 9 additions and 1 deletions

View File

@@ -1269,7 +1269,8 @@ static int EvalEA (const InsDesc* Ins, EffAddr* A)
ExprNode* Left = A->Expr->Left;
if ((A->Expr->Op == EXPR_BYTE0 || A->Expr->Op == EXPR_BYTE1) &&
Left->Op == EXPR_SYMBOL &&
GetSymAddrSize (Left->V.Sym) != ADDR_SIZE_ZP) {
GetSymAddrSize (Left->V.Sym) != ADDR_SIZE_ZP &&
!(A->Flags & EFFADDR_OVERRIDE_ZP)) {
/* Output a warning */
Warning (1, "Suspicious address expression");