From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14512 invoked by alias); 2 Nov 2010 17:04:55 -0000 Received: (qmail 14502 invoked by uid 22791); 2 Nov 2010 17:04:51 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_FN,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Nov 2010 17:04:44 +0000 Received: from kpbe19.cbf.corp.google.com (kpbe19.cbf.corp.google.com [172.25.105.83]) by smtp-out.google.com with ESMTP id oA2H4fiA027195 for ; Tue, 2 Nov 2010 10:04:41 -0700 Received: from pva18 (pva18.prod.google.com [10.241.209.18]) by kpbe19.cbf.corp.google.com with ESMTP id oA2H3bK2028960 for ; Tue, 2 Nov 2010 10:04:39 -0700 Received: by pva18 with SMTP id 18so1113431pva.17 for ; Tue, 02 Nov 2010 10:04:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.97.16 with SMTP id u16mr6414156wfb.185.1288717479457; Tue, 02 Nov 2010 10:04:39 -0700 (PDT) Received: by 10.220.192.73 with HTTP; Tue, 2 Nov 2010 10:04:39 -0700 (PDT) In-Reply-To: <20101102165134.GA19296@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> Date: Tue, 02 Nov 2010 17:04:00 -0000 Message-ID: Subject: Re: [doc RFA] Switch to GCC coding style [Re: [patch] initial OpenCL C language support] From: Doug Evans To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Joel Brobecker , Ken Werner , Tom Tromey , Pedro Alves Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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/msg00022.txt.bz2 On Tue, Nov 2, 2010 at 9:51 AM, Jan Kratochvil wrote: > On Wed, 27 Oct 2010 21:20:50 +0200, Pedro Alves wrote: >> GCC makes that rule explicit: >> >> http://gcc.gnu.org/codingconventions.html > [...] >> We tend to follow these already, > > In such case is this patch OK? > > Another question is bfd/, opcodes/ etc. > > > Thanks, > Jan > > > gdb/ > 2010-11-02 =A0Jan Kratochvil =A0 > =A0 =A0 =A0 =A0 =A0 =A0Pedro Alves =A0 > > =A0 =A0 =A0 =A0* CONTRIBUTE (Coding Standards): Change to GCC Coding Conv= entions, > =A0 =A0 =A0 =A0update URL. > > gdb/doc/ > 2010-11-02 =A0Jan Kratochvil =A0 > > =A0 =A0 =A0 =A0* gdbint.texinfo (Coding Standards): Change to GCC Coding > =A0 =A0 =A0 =A0Conventions, provide URL. =A0Change `standards' to `conven= tions'. > =A0 =A0 =A0 =A0(Testsuite): Change to GCC Coding Conventions. > > --- a/gdb/CONTRIBUTE > +++ b/gdb/CONTRIBUTE > @@ -28,7 +28,7 @@ all contributors need to be aware of. > > =A0o =A0 =A0 =A0Coding Standards > > - =A0 =A0 =A0 All contributions must conform to the GNU Coding Standard. > + =A0 =A0 =A0 All contributions must conform to the GCC Coding Convention= s. > =A0 =A0 =A0 =A0Submissions which do not conform to the standards will be > =A0 =A0 =A0 =A0returned with a request to reformat the changes. > > @@ -36,7 +36,7 @@ o =A0 =A0 Coding Standards > =A0 =A0 =A0 =A0requirements are explained in the GDB internals documentat= ion > =A0 =A0 =A0 =A0in the gdb/doc directory. > > - =A0 =A0 =A0 Ref: http://www.gnu.org/prep/standards_toc.html > + =A0 =A0 =A0 Ref: http://gcc.gnu.org/codingconventions.html > > > =A0o =A0 =A0 =A0Copyright Assignment > --- a/gdb/doc/gdbint.texinfo > +++ b/gdb/doc/gdbint.texinfo > @@ -5765,13 +5765,12 @@ Binary search the array. > > =A0@section @value{GDBN} C Coding Standards > > -@value{GDBN} follows the GNU coding standards, as described in > -@file{etc/standards.texi}. =A0This file is also available for anonymous > -FTP from GNU archive sites. =A0@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}. =A0@value{GDBN} takes a= strict > +interpretation of the standard; in general, when the GCC conventions rec= ommend > +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 > =A0@value{GDBN}, as described in the following sections. > > =A0@subsection ISO C > @@ -5784,7 +5783,7 @@ compiler. > =A0@subsection Formatting > > =A0@cindex source code formatting > -The standard GNU recommendations for formatting must be followed > +The standard GCC recommendations for formatting must be followed > =A0strictly. > > =A0A function declaration should not have its name in column zero. =A0A > @@ -5831,7 +5830,7 @@ void* foo; > =A0@subsection Comments > > =A0@cindex comment formatting > -The standard GNU requirements on comments must be followed strictly. > +The standard GCC requirements on comments must be followed strictly. > > =A0Block comments must appear in the following form, with no @code{/*}- or > =A0@code{*/}-only lines, and no leading @code{*}: > @@ -7821,7 +7820,7 @@ The source language programs do @emph{not} need to = be in a consistent > =A0style. =A0Since @value{GDBN} is used to debug programs written in many= different > =A0styles, it's worth having a mix of styles in the testsuite; for > =A0instance, 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 > =A0uniformly. > > =A0@node Hints > There are lots of things on the gcc codingconventions page that need to be converted (e.g., gcc_assert), or revised (e.g., prototypes for _initialize_foo fns can appear in .c files (and should *only* appear in .c files)). I'm not sure, but it might be simpler to just copy over the relevant bits.