[doc patch] gdbint: braces for two lines in code [Re: [patch] Fix for PR gdb/9538 (loading of separate debuginfo and symlinks).]

Doug Evans dje@google.com
Fri Jan 13 00:27:00 GMT 2012


On Thu, Jan 12, 2012 at 3:54 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Fri, 13 Jan 2012 00:28:35 +0100, Doug Evans wrote:
>> I think we should make the braces required.
>
> OK to check in?

Ok by me!
[give it awhile to see if anyone objects :-)]


>
>
> Thanks,
> Jan
>
>
> gdb/doc/
> 2012-01-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
>
>        * gdbint.texinfo (Coding Standards): Require braces for two lines of
>        code.
>
> --- a/gdb/doc/gdbint.texinfo
> +++ b/gdb/doc/gdbint.texinfo
> @@ -5849,6 +5849,26 @@ the following guidelines:
>  @tab (pointer dereference)
>  @end multitable
>
> +Any two lines in code should be wrapped in braces as they look as separate
> +statements:
> +
> +@smallexample
> +if (i)
> +  @{
> +    /* Return success.  */
> +    return 0;
> +  @}
> +@end smallexample
> +
> +@noindent
> +and not:
> +
> +@smallexample
> +if (i)
> +  /* Return success.  */
> +  return 0;
> +@end smallexample
> +
>  @subsection Comments
>
>  @cindex comment formatting



More information about the Gdb-patches mailing list