From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8864 invoked by alias); 2 Nov 2010 19:21:57 -0000 Received: (qmail 8851 invoked by uid 22791); 2 Nov 2010 19:21:56 -0000 X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL,TW_FN X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Nov 2010 19:21:51 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LB900I00UV6L900@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Tue, 02 Nov 2010 21:20:37 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.98.164]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LB900I4YV26M700@a-mtaout22.012.net.il>; Tue, 02 Nov 2010 21:20:32 +0200 (IST) Date: Tue, 02 Nov 2010 19:21:00 -0000 From: Eli Zaretskii Subject: Re: [doc RFA] Switch to GCC coding style [Re: [patch] initial OpenCL C language support] In-reply-to: <20101102172246.GA22137@host0.dyn.jankratochvil.net> To: Jan Kratochvil Cc: dje@google.com, gdb-patches@sourceware.org, brobecker@adacore.com, ken@linux.vnet.ibm.com, tromey@redhat.com, pedro@codesourcery.com Reply-to: Eli Zaretskii Message-id: <8339rj5y7z.fsf@gnu.org> 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> <20101102172246.GA22137@host0.dyn.jankratochvil.net> 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/msg00045.txt.bz2 > Date: Tue, 2 Nov 2010 18:22:46 +0100 > From: Jan Kratochvil > Cc: gdb-patches@sourceware.org, Joel Brobecker , Ken Werner , Tom Tromey , Pedro Alves > > 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 Are you submitting this for doc review, or will we discuss the issue first? Or maybe the issue is already decided? Please help me out here. > -@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. The old text talked about "GNU coding _standards_", so it was understandable when it later mentioned "interpretation of the standard". But you replaced "standards" with "Conventions", so now "interpretation of the standard" begs the question: "what standard?". Also, this is actually the first violation in GDB history of the GCC Conventions, which request to use @uref, not @url for references to Web pages. ;-) > -The standard GNU recommendations for formatting must be followed > +The standard GCC recommendations for formatting must be followed > strictly. There are no "recommendations for formatting" that I could spot in the GCC Conventions. At least they are not called that. > -The standard GNU requirements on comments must be followed strictly. > +The standard GCC requirements on comments must be followed strictly. I see no requirements on comments in the GCC Conventions. But even if I missed something, why single out only this part? > +@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. I don't think this is enough, sorry. The GCC Conventions mention a lot of details that are utterly inapplicable to GDB. The exceptions you mention are just a drop in that sea. What about references to ERROR_MARK, RTL, --param arguments, what about fastjar and boehm-gc? And those are just a few random examples. On balance, I think we should simply have our own coherent document. It can copy verbatim all the stuff that is relevant to GDB, but it should include the above renames, and it should omit everything that is irrelevant. Any other way, we will just confuse potential contributors: it is perhaps easy for us old-timers to distinguish between the relevant and the rest, but for a newbie contributor it could be an impossible requirement. To say nothing of the fact that they will now have to read two documents instead of 1. Thanks.