On Wed, 21 Oct 2015, Bernd Schmidt wrote:

> On 10/21/2015 11:29 PM, Joseph Myers wrote:
> > On Wed, 21 Oct 2015, Steve Ellcey wrote:
> > 
> > > Hm, how about a separate warning that wasn't part of -Wall but could
> > > still be used by GCC or other products that wanted to enforce a 'no
> > > unnecessary parenthesis' coding style.  Not that I'm volunteering.
> > 
> > What's "unnecessary"?  It's normal in GNU style to add extra parentheses
> > when their contents go over multiple lines, to help editors get
> > indentation right....
> 
> But not for things on a single line, like the ones I quoted:

Indeed.  Such a hypothetical warning would need to distinguish these cases 
(as well as the ones where parentheses are formally redundant but their 
absence is diagnosed by -Wparentheses) - the GNU rule is *not* to avoid 
any parentheses that don't change precedence.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to