* [9front] cc: fix comparison warning with constant LHS
@ 2021-01-20 10:44 Michael Forney
0 siblings, 0 replies; only message in thread
From: Michael Forney @ 2021-01-20 10:44 UTC (permalink / raw)
To: 9front
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.
diff -r a347b0b9f57e -r 11c719e3c471 sys/src/cmd/cc/com.c
--- a/sys/src/cmd/cc/com.c Mon Jan 18 17:55:01 2021 -0800
+++ b/sys/src/cmd/cc/com.c Wed Jan 20 01:29:03 2021 -0800
@@ -1405,7 +1405,7 @@
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-20 11:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 10:44 [9front] cc: fix comparison warning with constant LHS Michael Forney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).