From: Michael Forney <mforney@mforney.org>
To: 9front@9front.org
Subject: [9front] cc: fix comparison warning with constant LHS
Date: Wed, 20 Jan 2021 02:44:28 -0800 [thread overview]
Message-ID: <C7828AD58CA71E0A063295A0042486B4@arrow.hsd1.ca.comcast.net> (raw)
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;
reply other threads:[~2021-01-20 11:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C7828AD58CA71E0A063295A0042486B4@arrow.hsd1.ca.comcast.net \
--to=mforney@mforney.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).