This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [doc patch] gdbint: braces for two lines in code [Re: [patch] Fix for PR gdb/9538 (loading of separate debuginfo and symlinks).]
> Date: Fri, 13 Jan 2012 00:54:51 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Paul Pluzhnikov <ppluzhnikov@google.com>, gdb-patches@sourceware.org
>
> On Fri, 13 Jan 2012 00:28:35 +0100, Doug Evans wrote:
> > I think we should make the braces required.
>
> OK to check in?
Yes, with one comment:
> +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
If you really want to make a point that this rule is valid even if the
second line is a comment, then I suggest to say so explicitly in the
text.
Otherwise, I'd suggest to replace the comment with a non-comment line.
Thanks.