All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] catch !x & y brainos
@ 2008-02-22 23:05 Al Viro
  2008-04-03 21:26 ` Josh Triplett
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2008-02-22 23:05 UTC (permalink / raw)
  To: josh; +Cc: linux-sparse


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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-03 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-22 23:05 [PATCH 3/3] catch !x & y brainos Al Viro
2008-04-03 21:26 ` Josh Triplett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.