mirror of
https://github.com/cc65/cc65.git
synced 2025-03-04 00:30:35 +00:00
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:
parent
b208b7e3b1
commit
17d592352c
@ -870,7 +870,7 @@ static void ArrayRef (ExprDesc* Expr)
|
||||
ED_MakeConstAbsInt (&Subscript, 0);
|
||||
ElementType = Indirect (Expr->Type);
|
||||
}
|
||||
|
||||
|
||||
/* The element type has the combined qualifiers from itself and the array,
|
||||
* it is a member of (if any).
|
||||
*/
|
||||
@ -1121,7 +1121,11 @@ static void StructRef (ExprDesc* Expr)
|
||||
Expr->IVal += Field->V.Offs;
|
||||
|
||||
/* 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)) {
|
||||
Expr->Type = Field->Type;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user