This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: potential patch for gdb bug c++/20020


OK, I will update to include both suggestions.

Regarding the test case, I don't know how to write a unit test case if
that's what you're asking for.  However, there are directions for
reproducing the problem I experience in my original bug report
c++/23953 (subsequently closed as a duplicate of 20020).

I'll send the updated patch momentarily.

--Bob
On Thu, Dec 6, 2018 at 4:07 PM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "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


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