On Wed, Apr 27, 2016 at 09:23:47AM -0400, Patrick Palka wrote: > Here's an updated patch that mentions that & and | are also affected. And I > can't see how this change would possibly affect the attr caching stuff since > it > just makes > > (a) OP ((b) OP (c)) > > get emitted as > > (a) OP (b) OP (c) > > For OP = || or &&, the expressions a, b and c will still get evaluated left to > right. And for OP = | or &, the order of evaluation of a, b and c remains > undefined. > > Is this OK to commit after testing on x86_64-pc-linux-gnu? > > gcc/ChangeLog: > > * genattrtab.c (write_test_expr): New parameter EMIT_PARENS > which defaults to true. Emit an outer pair of parentheses only if > EMIT_PARENS. When continuing a chain of && or || (or & or |), > don't emit parentheses for the right-hand operand.
Ok for trunk. Jakub