From 78e80eb942b7ad7f78d111a553637314cec7192f Mon Sep 17 00:00:00 2001 From: acqn Date: Tue, 9 Aug 2022 13:13:33 +0800 Subject: [PATCH] Fixed superfluous warning on pointer types comparing a non-void pointer to a void pointer. --- src/cc65/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 84f46504c..dbcddd4f9 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -2340,7 +2340,7 @@ static void hie_compare (const GenDesc* Ops, /* List of generators */ } else if (IsClassPtr (Expr->Type)) { if (IsClassPtr (Expr2.Type)) { /* Pointers are allowed in comparison */ - if (TypeCmp (Expr->Type, Expr2.Type).C < TC_STRICT_COMPATIBLE) { + if (TypeCmp (Expr->Type, Expr2.Type).C < TC_VOID_PTR) { /* Warn about distinct pointer types */ TypeCompatibilityDiagnostic (PtrConversion (Expr->Type), PtrConversion (Expr2.Type), 0, "Distinct pointer types comparing '%s' with '%s'");