This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] objdump.c fix formatting.
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: Elias Athanasopoulos <eathan at otenet dot gr>, <binutils at sources dot redhat dot com>
- Date: Mon, 3 Jun 2002 03:32:36 -0400 (EDT)
- Subject: Re: [PATCH] objdump.c fix formatting.
On Mon, 3 Jun 2002, Alan Modra wrote:
> On Mon, Jun 03, 2002 at 12:22:19AM +0300, Elias Athanasopoulos wrote:
> > Sorry for the previous careless posting. :-(
>
> Your patch _introduces_ formatting errors, and there is no ChangeLog
> entry.
Right (except just for the removed braces).
> Incidentanlly, I'm not aware of any place where the GNU coding
> standard says not to use unnecessary braces.
It uses an example to state this, in "Formatting Your Source
Code", <URL:http://www.gnu.org/prep/standards_23.html#SEC23>:
For the body of the function, our recommended style looks like
this:
if (x < foo (y, z))
haha = bar[4] + 5;
else
{
while (z)
{
haha += foo (z, z);
z--;
}
return ++x + bar ();
}
> In fact, it stipulates
> extra braces in a number of circumstances, eg. nested if, do while.
So it does, but also by example, and after the "rule" above.
brgds, H-P
PS. To whom it concerns: please leave me out of any discussion
about *personal* formatting preferences.