public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>,
	brobecker@adacore.com, jan.kratochvil@redhat.com, eliz@gnu.org,
	dje@google.com, ken@linux.vnet.ibm.com, tromey@redhat.com
Subject: Re: [doc RFA] Switch to GCC coding style [Re: [patch] initial OpenCL C language support]
Date: Mon, 08 Nov 2010 16:54:00 -0000	[thread overview]
Message-ID: <201011081654.16724.pedro@codesourcery.com> (raw)
In-Reply-To: <201011081638.oA8GciFV005540@glazunov.sibelius.xs4all.nl>

Mark Kettenis wrote:

> > I agree that 1 document would be better, even if we end up duplicating
> > some information in GCS. It's just simpler for everyone.
> 
> Not sure about that.  Quite a few people are already familliar with
> the GNU Coding standards.  Having a document that describes just the
> additional bits means there is less material to read through, and less
> likely for people to miss the GDB-specific bits.
> 

I'm quite behind on reading gdb-patches@, but I agree.

Currently, the "C Coding Standards" section in gdbint.exp reads:

> "@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 an additional set of coding standards specific to
> @value{GDBN}, as described in the following sections."
..

So we're already describing that we're stricter than the GNU coding standards,
and that we follow an _additional_ set of coding.  It appears to me that
we should just list the extra rules quoted above in the "Formatting"
subsection;

> @subsection Formatting

> @cindex source code formatting
> The standard GNU recommendations for formatting must be followed
> strictly.

> A function declaration should not have its name in column zero.  A
> function definition should have its name in column zero.

by just saying that the recommendations must be followed strictly, and
and a sentence saying something to the effect of "the following list of extra 
GDB specific rules apply" (the ones I quoted from GCC earlier):

Code in GDB should use the following formatting conventions: 
Use...                     ...instead of
!x                         ! x
~x                         ~ x
-x (unary minus)           - x
(foo) x (cast)             (foo)x
*x (pointer dereference)   * x

This is all I was suggesting before.  Really.

  parent reply	other threads:[~2010-11-08 16:54 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 17:21 [patch] initial OpenCL C language support Ken Werner
2010-10-25 22:41 ` Tom Tromey
2010-10-26 13:05   ` Ken Werner
2010-10-26 13:44     ` Tom Tromey
2010-10-26 16:02       ` Ken Werner
2010-10-26 17:49         ` Eli Zaretskii
2010-10-26 19:58         ` Joel Brobecker
2010-10-26 20:03           ` Joel Brobecker
2010-10-27 13:36             ` Ken Werner
2010-11-02 19:23               ` Joel Brobecker
2010-11-03 13:03                 ` Ken Werner
2010-11-03 15:27                   ` Joel Brobecker
2010-11-04 15:39                     ` Ken Werner
2010-11-04 17:48                       ` Eli Zaretskii
2010-11-05 14:21                         ` Ken Werner
2010-11-05 14:39                     ` Ken Werner
2010-10-27 19:04           ` Jan Kratochvil
2010-10-27 19:21             ` Pedro Alves
2010-10-27 21:01               ` Ken Werner
2010-11-02 16:52               ` [doc RFA] Switch to GCC coding style [Re: [patch] initial OpenCL C language support] Jan Kratochvil
2010-11-02 17:04                 ` Doug Evans
2010-11-02 17:23                   ` Jan Kratochvil
2010-11-02 17:29                     ` Doug Evans
2010-11-02 19:21                     ` Eli Zaretskii
2010-11-02 19:29                       ` Joel Brobecker
2010-11-08 12:50                       ` Jan Kratochvil
2010-11-08 16:11                         ` Joel Brobecker
2010-11-08 16:38                           ` Mark Kettenis
2010-11-08 16:43                             ` Joel Brobecker
2010-11-08 16:54                             ` Pedro Alves [this message]
2010-11-08 18:36                               ` Joel Brobecker
2010-11-02 18:01                   ` Joel Brobecker
2010-11-02 18:10                     ` [doc RFA] Switch to GCC coding style Jan Kratochvil
2010-11-02 18:20                       ` Doug Evans
2010-11-02 18:58                         ` Joel Brobecker
2010-11-02 19:19                           ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201011081654.16724.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=dje@google.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=ken@linux.vnet.ibm.com \
    --cc=mark.kettenis@xs4all.nl \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).