aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--evaluate.c3
1 files changed, 3 insertions, 0 deletions
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;