This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Compare addresses in operand_equal_p correctly
- From: Andrew Haley <aph at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Richard Sandiford <richard at codesourcery dot com>, 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 17:10:08 +0000
- Subject: Re: [patch] Compare addresses in operand_equal_p correctly
- References: <email@example.com> <Pine.LNX.firstname.lastname@example.org>
Roger Sayle writes:
> 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.
Insert extra parentheses so that Emacs will indent the code
properly. For example, the following indentation looks nice if you do
it by hand,
v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
+ rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000;
but Emacs would alter it. Adding a set of parentheses produces
something that looks equally nice, and which Emacs will preserve:
v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
+ rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000);