linux-mips
[Top] [All Lists]

Re: [PATCH] [MIPS] Malta: Remove unneeded function protos from malta-res

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH] [MIPS] Malta: Remove unneeded function protos from malta-reset.c
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Wed, 1 Jul 2009 16:46:48 +0100 (BST)
Cc: Dmitri Vorobiev <dmitri.vorobiev@movial.com>, linux-mips@linux-mips.org
In-reply-to: <20090701063116.GA6101@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1246035565-24015-1-git-send-email-dmitri.vorobiev@movial.com> <20090628181702.GB20084@linux-mips.org> <alpine.LFD.2.00.0907010108380.23134@eddie.linux-mips.org> <20090701063116.GA6101@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)
On Wed, 1 Jul 2009, Ralf Baechle wrote:

> Code written to require intimate knowledge of all operator priorities is
> probably as bad as overuse.  Here a few examples:
> 
>       return (1);
> #define FOO   (42)
>       a = (b + c);
>       a = (b + c) + d;
>       a = (b * c) + (d * e);
>       if ((a > b) && (a < c))

 Sometimes additional brackets are useful to emphasise some logical 
grouping of entities used, so I would accept even such a construct as:

        a = (b + c + d) + (e + f);

to bring attention of the reader that a, b and c refer to something other 
than e and f, but yes, it would require explicit justification and I 
wouldn't consider it a blanket accept statement for such kinds of 
expressions.

 The #define case makes my eyes hurt.  OTOH we require unnecessary 
brackets in the context of sizeof. ;)

  Maciej

<Prev in Thread] Current Thread [Next in Thread>