mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Split the test for assignment and parenthesis.
This will make it easier to fix the internal error for "if (x = 0)".
This commit is contained in:
parent
b9a0e2ce03
commit
82ded2b638
1 changed files with 2 additions and 3 deletions
|
@ -1176,9 +1176,8 @@ convert_bool (expr_t *e, int block)
|
|||
{
|
||||
expr_t *b;
|
||||
|
||||
if (e->type == ex_expr && (e->e.expr.op == '=' || e->e.expr.op == PAS)
|
||||
&& !e->paren) {
|
||||
if (options.warnings.precedence)
|
||||
if (e->type == ex_expr && (e->e.expr.op == '=' || e->e.expr.op == PAS)) {
|
||||
if (!e->paren && options.warnings.precedence)
|
||||
warning (e, "suggest parentheses around assignment "
|
||||
"used as truth value");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue