1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +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:
Oliver Schmidt 2015-12-29 12:11:33 +01:00
commit 104f898260

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