mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
make --tradiontial cause "!foo & bar" evaluate as "!(foo & bar)" as per
qfcc's broken behaviour.
This commit is contained in:
parent
e5c470d5e4
commit
3476138988
1 changed files with 7 additions and 2 deletions
|
@ -1226,8 +1226,13 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
|||
|
||||
if ((op == '&' || op == '|')
|
||||
&& e1->type == ex_uexpr && e1->e.expr.op == '!' && !e1->paren) {
|
||||
warning (e1, "ambiguous logic. Suggest explicit parentheses with "
|
||||
"expressions involving ! and %c", op);
|
||||
if (options.traditional) {
|
||||
e1->e.expr.e1->paren = 1;
|
||||
return unary_expr ('!', binary_expr (op, e1->e.expr.e1, e2));
|
||||
} else {
|
||||
warning (e1, "ambiguous logic. Suggest explicit parentheses with "
|
||||
"expressions involving ! and %c", op);
|
||||
}
|
||||
}
|
||||
|
||||
if (t1 != t2) {
|
||||
|
|
Loading…
Reference in a new issue