1
0
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:
Greg King 2015-12-29 04:18:17 -05:00
parent 02e4b5bfe3
commit 3b303396bf

View File

@ -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)) {