From 33b0ef36fca702b0f911f3cae11f39fe5be25e51 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 22 Feb 2008 23:05:35 +0000 Subject: catch !x & y brainos Signed-off-by: Al Viro --- evaluate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/evaluate.c b/evaluate.c index 2901c1bc..49285841 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; -- cgit 1.2.3-korg