Fixed an error with r4329: In case of a struct pointer the qualifiers of the
pointers had been used, not the qualifiers of the struct. git-svn-id: svn://svn.cc65.org/cc65/trunk@4340 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -870,7 +870,7 @@ static void ArrayRef (ExprDesc* Expr)
|
|||||||
ED_MakeConstAbsInt (&Subscript, 0);
|
ED_MakeConstAbsInt (&Subscript, 0);
|
||||||
ElementType = Indirect (Expr->Type);
|
ElementType = Indirect (Expr->Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The element type has the combined qualifiers from itself and the array,
|
/* The element type has the combined qualifiers from itself and the array,
|
||||||
* it is a member of (if any).
|
* it is a member of (if any).
|
||||||
*/
|
*/
|
||||||
@@ -1121,7 +1121,11 @@ static void StructRef (ExprDesc* Expr)
|
|||||||
Expr->IVal += Field->V.Offs;
|
Expr->IVal += Field->V.Offs;
|
||||||
|
|
||||||
/* 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);
|
if (IsClassStruct (Expr->Type)) {
|
||||||
|
Q = GetQualifier (Expr->Type);
|
||||||
|
} else {
|
||||||
|
Q = GetQualifier (Indirect (Expr->Type));
|
||||||
|
}
|
||||||
if (GetQualifier (Field->Type) == (GetQualifier (Field->Type) | Q)) {
|
if (GetQualifier (Field->Type) == (GetQualifier (Field->Type) | Q)) {
|
||||||
Expr->Type = Field->Type;
|
Expr->Type = Field->Type;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user