This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Compare addresses in operand_equal_p correctly
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Sandiford <richard at codesourcery dot com>
- Cc: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 14 Nov 2006 09:12:51 -0700 (MST)
- Subject: Re: [patch] Compare addresses in operand_equal_p correctly
On Tue, 14 Nov 2006, Richard Sandiford wrote:
> >> ! return (OP_SAME (0)
> >> ! && OP_SAME (1)
> >> && OP_SAME_WITH_NULL (2)
> >> && OP_SAME_WITH_NULL (3));
> > You don't need the outermost parenthesis around return expressions
> > in the GNU coding style.
> But you do need them for multi-line conditionals AIUI.
Really? I couldn't find any reference to it in the GNU or GCC conventions
on identation or parenthesis. That multi-line conditionals are surrounded
by pathenthesis in "if" and "while" statements is an aspect of the
statement syntax, i.e. they can't be removed. In the RHS of assignemnts
they may be needed for precedence. But their use in case and return
statements is analogous to double nesting, i.e. ((X + Y)), which whilst
it does no harm, has little benefit.
But I've no strong opinion, and could easily be wrong.