From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22216 invoked by alias); 13 Jan 2012 14:33:36 -0000 Received: (qmail 22207 invoked by uid 22791); 13 Jan 2012 14:33:35 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Jan 2012 14:32:53 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0DEWclc022726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Jan 2012 09:32:38 -0500 Received: from host2.jankratochvil.net (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q0DEWXGl001061 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 13 Jan 2012 09:32:36 -0500 Date: Fri, 13 Jan 2012 14:37:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: Joel Brobecker , palves@redhat.com, dje@google.com, ppluzhnikov@google.com, gdb-patches@sourceware.org Subject: [commit] [doc patch] gdbint: braces for two lines in code [Re: [patch] Fix for PR gdb/9538 (loading of separate debuginfo and symlinks).] Message-ID: <20120113143232.GA14010@host2.jankratochvil.net> References: <20120113110600.GA3501@host2.jankratochvil.net> <4F1011EA.1030509@redhat.com> <83r4z3kfkg.fsf@gnu.org> <20120113121117.GT31383@adacore.com> <83pqenkc99.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83pqenkc99.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00479.txt.bz2 On Fri, 13 Jan 2012 13:39:14 +0100, Eli Zaretskii wrote: > > > Any two or more lines in code should be wrapped in braces, even if > > > they are comments, as they look as separate statements: > > ^^ like ? > > Fine with me, FWIW. Checked in. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2012-01/msg00125.html --- src/gdb/doc/ChangeLog 2012/01/11 10:34:21 1.1263 +++ src/gdb/doc/ChangeLog 2012/01/13 14:31:55 1.1264 @@ -1,3 +1,9 @@ +2012-01-13 Jan Kratochvil + Eli Zaretskii + + * gdbint.texinfo (Coding Standards): Require braces for two lines of + code. + 2012-01-11 Paul Hilfinger * gdb.texinfo (Variables): Document use of :: for non-static --- src/gdb/doc/gdbint.texinfo 2012/01/05 09:41:03 1.334 +++ src/gdb/doc/gdbint.texinfo 2012/01/13 14:31:55 1.335 @@ -5849,6 +5849,26 @@ @tab (pointer dereference) @end multitable +Any two or more lines in code should be wrapped in braces, even if +they are comments, as they look like 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