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: [doc patch] gdbint: braces for two lines in code [Re: [patch] Fix for PR gdb/9538 (loading of separate debuginfo and symlinks).]


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


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