This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]