This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [LTO] PATCH: builtins.c/CALL_EXPR patch, take 2
On Monday 03 July 2006 00:24, Sandra Loosemore wrote:
> But, is there really a formal
> written policy against inserting parentheses that are not syntactically
> necessary? (The only thing the GNU Coding Standards document says about it
> is a suggestion to *add* them to help Emacs indent things better.)
For reference: http://www.gnu.org/prep/standards/standards.html#Formatting
The coding standards also ask you to use parenthesis to clarify precedence.
In you case it's pretty clear what the condition says without the parens.
> Even if
> the parentheses are not strictly necessary for machine parsing of the
> expression, they make it easier for *humans* to parse the code by providing
> visual cues about the grouping of the subexpressions.
It's just not usually done anywhere else in GCC, so the de facto standard
is without the parens. I guess it's something a developer has to decide
on a per case basis. And if you're interested in my $0.02, I agree with
Roger in this case.
Gr.
Steven