From 3b303396bf3b5670e76a53e4dffd01c610b07c82 Mon Sep 17 00:00:00 2001 From: Greg King Date: Tue, 29 Dec 2015 04:18:17 -0500 Subject: [PATCH] Made cc65 accept comparisons between pointers with different qualifiers (similarly to subtractions between pointers). --- src/cc65/expr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) { -- 2.39.5