From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27600 invoked by alias); 2 Nov 2010 17:23:38 -0000 Received: (qmail 27575 invoked by uid 22791); 2 Nov 2010 17:23:32 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_FN,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; Tue, 02 Nov 2010 17:23:25 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oA2HN1U6005630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 2 Nov 2010 13:23:01 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oA2HMu4R011821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Nov 2010 13:23:00 -0400 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id oA2HMpa5022734; Tue, 2 Nov 2010 18:22:52 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oA2HMk0t022733; Tue, 2 Nov 2010 18:22:46 +0100 Date: Tue, 02 Nov 2010 17:23:00 -0000 From: Jan Kratochvil To: Doug Evans Cc: gdb-patches@sourceware.org, Joel Brobecker , Ken Werner , Tom Tromey , Pedro Alves Subject: Re: [doc RFA] Switch to GCC coding style [Re: [patch] initial OpenCL C language support] Message-ID: <20101102172246.GA22137@host0.dyn.jankratochvil.net> References: <201010221920.30046.ken@linux.vnet.ibm.com> <20101026195747.GE2847@adacore.com> <20101027190417.GA19067@host1.dyn.jankratochvil.net> <201010272020.51386.pedro@codesourcery.com> <20101102165134.GA19296@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 2010-11/txt/msg00025.txt.bz2 On Tue, 02 Nov 2010 18:04:39 +0100, Doug Evans wrote: > There are lots of things on the gcc codingconventions page that need > to be converted (e.g., gcc_assert), Done. > or revised (e.g., prototypes for _initialize_foo fns can appear in .c files > (and should *only* appear in .c files)). I do not see a current GDB doc problem with this (+it may be offtopic for this patch). Thanks, Jan gdb/ 2010-11-02 Jan Kratochvil Pedro Alves * CONTRIBUTE (Coding Standards): Change to GCC Coding Conventions, update URL. gdb/doc/ 2010-11-02 Jan Kratochvil * gdbint.texinfo (Coding Standards): Change to GCC Coding Conventions, provide URL. Change `standards' to `conventions'. (C Usage): New paragraph. (Testsuite): Change to GCC Coding Conventions. --- a/gdb/CONTRIBUTE +++ b/gdb/CONTRIBUTE @@ -28,7 +28,7 @@ all contributors need to be aware of. o Coding Standards - All contributions must conform to the GNU Coding Standard. + All contributions must conform to the GCC Coding Conventions. Submissions which do not conform to the standards will be returned with a request to reformat the changes. @@ -36,7 +36,7 @@ o Coding Standards requirements are explained in the GDB internals documentation in the gdb/doc directory. - Ref: http://www.gnu.org/prep/standards_toc.html + Ref: http://gcc.gnu.org/codingconventions.html o Copyright Assignment --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -5765,13 +5765,12 @@ Binary search the array. @section @value{GDBN} C Coding Standards -@value{GDBN} follows the GNU coding standards, as described in -@file{etc/standards.texi}. This file is also available for anonymous -FTP from GNU archive sites. @value{GDBN} takes a strict interpretation -of the standard; in general, when the GNU standard recommends a practice -but does not require it, @value{GDBN} requires it. +@value{GDBN} follows the GCC Coding Conventions, available from +@url{http://gcc.gnu.org/codingconventions.html}. @value{GDBN} takes a strict +interpretation of the standard; in general, when the GCC conventions recommend +a practice but do not require it, @value{GDBN} requires it. -@value{GDBN} follows an additional set of coding standards specific to +@value{GDBN} follows an additional set of coding conventions specific to @value{GDBN}, as described in the following sections. @subsection ISO C @@ -5784,7 +5783,7 @@ compiler. @subsection Formatting @cindex source code formatting -The standard GNU recommendations for formatting must be followed +The standard GCC recommendations for formatting must be followed strictly. A function declaration should not have its name in column zero. A @@ -5831,7 +5830,7 @@ void* foo; @subsection Comments @cindex comment formatting -The standard GNU requirements on comments must be followed strictly. +The standard GCC requirements on comments must be followed strictly. Block comments must appear in the following form, with no @code{/*}- or @code{*/}-only lines, and no leading @code{*}: @@ -5880,6 +5879,11 @@ protected with parentheses.) Declarations like @samp{struct foo *} should be used in preference to declarations like @samp{typedef struct foo @{ @dots{} @} *foo_ptr}. +@code{gcc_assert} references in GCC Coding Conventions should be replaced by +@code{gdb_assert}. @code{gcc_unreachable} should be replaced by +@code{gdb_assert_not_reached}. Standard @code{} header file and its +functions can and should be used. + @subsection Function Prototypes @cindex function prototypes @@ -7821,7 +7825,7 @@ The source language programs do @emph{not} need to be in a consistent style. Since @value{GDBN} is used to debug programs written in many different styles, it's worth having a mix of styles in the testsuite; for instance, some @value{GDBN} bugs involving the display of source lines would -never manifest themselves if the programs used GNU coding style +never manifest themselves if the programs used GCC Coding Conventions uniformly. @node Hints