Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Bob Steagall <bob.steagall.cpp@gmail.com>
Cc: andrew.burgess@embecosm.com,  gdb-patches@sourceware.org
Subject: Re: potential patch for gdb bug c++/20020
Date: Thu, 06 Dec 2018 21:07:00 -0000	[thread overview]
Message-ID: <87va46cqk7.fsf@tromey.com> (raw)
In-Reply-To: <CAOhs8xKJXH0fTNmdGQuybNT=VCUO4c4iJZix4EhTATzer997vw@mail.gmail.com>	(Bob Steagall's message of "Thu, 6 Dec 2018 15:48:30 -0500")

>>>>> "Bob" == Bob Steagall <bob.steagall.cpp@gmail.com> writes:

>> You should drop the '{' and '}' here for a single statement block.

Bob> Disagree.  The gdb coding standard document specifically calls out
Bob> lines of code,
Bob> not statements:

Bob>     "Any two or more lines in code should be wrapped in braces, even if they
Bob>      are comments, as they look like separate statements"

I think this is just slightly mis-worded -- Andrew's interpretation is
the prevailing one.  That is, no brace for:

  if (blah)
     function_call (spanning,
                    multiple,
                    lines);

... but do have braces for:

  if (blah)
    {
      /* Just a comment.  */
      anything ();
    }

I agree the patch is good.  I think a test case would be good to have,
unless for some reason it's difficult to write one.

Tom


      reply	other threads:[~2018-12-06 21:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOhs8xKxGGTqpuFd40wWA8O6i97Odc_dmG=csK1DAFf=TCnYbg@mail.gmail.com>
2018-12-06 18:29 ` Bob Steagall
2018-12-06 19:20   ` Andrew Burgess
2018-12-06 20:49     ` Bob Steagall
2018-12-06 21:07       ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87va46cqk7.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=bob.steagall.cpp@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox