diff options
author | Michael Forney <mforney@mforney.org> | 2021-01-23 18:28:08 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2021-01-23 18:28:08 -0800 |
commit | e8b8cec9c7ce157a67a22a84a5716e271245d049 (patch) | |
tree | e993defbc8be5e666e388d356ec85dee4cb6a992 | |
parent | a8834acf73c4c5bfa337fd3fb1ffc82151423a54 (diff) | |
download | plan9front-e8b8cec9c7ce157a67a22a84a5716e271245d049.tar.xz |
[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.
-rw-r--r-- | sys/src/cmd/cc/com.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |