mirror of
https://github.com/cc65/cc65.git
synced 2024-12-28 06:30:16 +00:00
Made cc65 accept comparisons between pointers with different qualifiers (similarly to subtractions between pointers).
This commit is contained in:
parent
02e4b5bfe3
commit
3b303396bf
@ -2105,8 +2105,8 @@ static void hie_compare (const GenDesc* Ops, /* List of generators */
|
||||
*/
|
||||
Type* left = Indirect (Expr->Type);
|
||||
Type* right = Indirect (Expr2.Type);
|
||||
if (TypeCmp (left, right) < TC_EQUAL && left->C != T_VOID && right->C != T_VOID) {
|
||||
/* Incomatible pointers */
|
||||
if (TypeCmp (left, right) < TC_QUAL_DIFF && left->C != T_VOID && right->C != T_VOID) {
|
||||
/* Incompatible pointers */
|
||||
Error ("Incompatible types");
|
||||
}
|
||||
} else if (!ED_IsNullPtr (&Expr2)) {
|
||||
|
Loading…
Reference in New Issue
Block a user