mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Merge pull request #253 from greg-king5/pointer-compares
Make cc65 accept comparisons between pointers with different qualifiers.
This commit is contained in:
commit
104f898260
@ -2105,8 +2105,8 @@ static void hie_compare (const GenDesc* Ops, /* List of generators */
|
|||||||
*/
|
*/
|
||||||
Type* left = Indirect (Expr->Type);
|
Type* left = Indirect (Expr->Type);
|
||||||
Type* right = Indirect (Expr2.Type);
|
Type* right = Indirect (Expr2.Type);
|
||||||
if (TypeCmp (left, right) < TC_EQUAL && left->C != T_VOID && right->C != T_VOID) {
|
if (TypeCmp (left, right) < TC_QUAL_DIFF && left->C != T_VOID && right->C != T_VOID) {
|
||||||
/* Incomatible pointers */
|
/* Incompatible pointers */
|
||||||
Error ("Incompatible types");
|
Error ("Incompatible types");
|
||||||
}
|
}
|
||||||
} else if (!ED_IsNullPtr (&Expr2)) {
|
} else if (!ED_IsNullPtr (&Expr2)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user