From: Greg King Date: Tue, 29 Dec 2015 09:18:17 +0000 (-0500) Subject: Made cc65 accept comparisons between pointers with different qualifiers (similarly... X-Git-Tag: V2.16~188^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3b303396bf3b5670e76a53e4dffd01c610b07c82;p=cc65 Made cc65 accept comparisons between pointers with different qualifiers (similarly to subtractions between pointers). --- diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 64fc17e3f..29e5771d4 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -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)) {