This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]