From e8b8cec9c7ce157a67a22a84a5716e271245d049 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 23 Jan 2021 18:28:08 -0800 Subject: [PATCH] [9front] cc: fix comparison warning with constant LHS This prevents an incorrect warning for a comparison such as `0 < x`, where x is an unsigned type. Previously, this would get normalized as `x >= 0` rather than `x > 0` when checking the comparison. --- sys/src/cmd/cc/com.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/cc/com.c b/sys/src/cmd/cc/com.c index 1b661317f..27f9c1134 100644 --- a/sys/src/cmd/cc/com.c +++ b/sys/src/cmd/cc/com.c @@ -1392,7 +1392,7 @@ compar(Node *n, int reverse) if(reverse){ r = n->left; l = n->right; - op = comrel[relindex(n->op)]; + op = invrel[relindex(n->op)]; }else{ l = n->left; r = n->right;