Changed solution for r4329 so that it uses less memory.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4331 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2009-10-05 18:22:28 +00:00
parent c69e2d9f0f
commit 7992bfb74a

View File

@@ -1107,7 +1107,7 @@ static void StructRef (ExprDesc* Expr)
/* The type is the type of the field plus any qualifiers from the struct */ /* The type is the type of the field plus any qualifiers from the struct */
Q = GetQualifier (Expr->Type); Q = GetQualifier (Expr->Type);
if (Q == T_QUAL_NONE) { if (GetQualifier (Field->Type) == (GetQualifier (Field->Type) | Q)) {
Expr->Type = Field->Type; Expr->Type = Field->Type;
} else { } else {
Expr->Type = TypeDup (Field->Type); Expr->Type = TypeDup (Field->Type);
@@ -1599,9 +1599,9 @@ void hie10 (ExprDesc* Expr)
ED_MakeRValExpr (Expr); ED_MakeRValExpr (Expr);
} }
/* If the expression is already a pointer to function, the /* If the expression is already a pointer to function, the
* additional dereferencing operator must be ignored. A function * additional dereferencing operator must be ignored. A function
* itself is represented as "pointer to function", so any number * itself is represented as "pointer to function", so any number
* of dereference operators is legal, since the result will * of dereference operators is legal, since the result will
* always be converted to "pointer to function". * always be converted to "pointer to function".
*/ */
if (IsTypeFuncPtr (Expr->Type) || IsTypeFunc (Expr->Type)) { if (IsTypeFuncPtr (Expr->Type) || IsTypeFunc (Expr->Type)) {