From: Al Viro <viro@ftp.linux.org.uk>
To: josh@freedesktop.org
Cc: linux-sparse@vger.kernel.org
Subject: [PATCH 3/3] catch !x & y brainos
Date: Fri, 22 Feb 2008 23:05:35 +0000 [thread overview]
Message-ID: <E1JSgxT-0003mf-2B@ZenIV.linux.org.uk> (raw)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
evaluate.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/evaluate.c b/evaluate.c
index 2901c1b..4928584 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -917,6 +917,9 @@ static struct symbol *evaluate_binop(struct expression *expr)
rtype = integer_promotion(rtype);
} else {
// The rest do usual conversions
+ if (op == '&' && expr->left->type == EXPR_PREOP &&
+ expr->left->op == '!')
+ warning(expr->pos, "dubious: !x & y");
ltype = usual_conversions(op, expr->left, expr->right,
lclass, rclass, ltype, rtype);
ctype = rtype = ltype;
--
1.5.3.GIT
next reply other threads:[~2008-02-22 23:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-22 23:05 Al Viro [this message]
2008-04-03 21:26 ` [PATCH 3/3] catch !x & y brainos Josh Triplett
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=E1JSgxT-0003mf-2B@ZenIV.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=josh@freedesktop.org \
--cc=linux-sparse@vger.kernel.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).