[PATCH] objdump.c fix formatting.

Hans-Peter Nilsson hp@bitrange.com
Mon Jun 3 00:32:00 GMT 2002


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.



More information about the Binutils mailing list