]> git.sur5r.net Git - cc65/commitdiff
Made cc65 accept comparisons between pointers with different qualifiers (similarly... 253/head
authorGreg King <gregdk@users.sf.net>
Tue, 29 Dec 2015 09:18:17 +0000 (04:18 -0500)
committerGreg King <gregdk@users.sf.net>
Tue, 29 Dec 2015 09:18:17 +0000 (04:18 -0500)
src/cc65/expr.c

index 64fc17e3f2833018b1c1b9d12a340bb0f956986b..29e5771d45f72a698231b43df648e46d045e22cc 100644 (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)) {