Re: Possible code defects: macros and precedence

From: Joe Perches
Date: Sun Sep 18 2016 - 05:32:14 EST


On Sun, 2016-09-18 at 07:09 +0200, Julia Lawall wrote:
> On Sat, 17 Sep 2016, Joe Perches wrote:
> > I also submitted a similar checkpatch addition that looks
> > for non-comma operators used macro arguments in function
> > definitions.
> >
> > The checkpatch test has the same weakness as the coccinelle
> > test. It doesn't check uses, just the macro definition.
> I wonder if it is really a weakness?  Does anyone care if a macro
> definition has more parentheses than what is necessary for the current
> usage

An excess of parentheses can hurt readability a little.