public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: Mark Kettenis <kettenis@chello.nl>,
	gdb@sources.redhat.com, Richard.Earnshaw@arm.com
Subject: Re: Coding style
Date: Sat, 03 May 2003 09:54:00 -0000	[thread overview]
Message-ID: <200305030954.h439sDl04926@pc960.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Fri, 02 May 2003 14:46:27 EDT." <3EB2BD03.8070407@redhat.com>


> makes sense, but when contracted into:
> 
> > int
> > max_register_size (struct gdbarch *gdbarch)
> > {
> >   struct regcache_descr *descr = regcache_descr (gdbarch);
> > 
> >   return descr->max_register_size;
> > }
> 
> or:
> 
> > int
> > max_register_size (struct gdbarch *gdbarch)
> > {
> >   struct regcache_descr *descr = regcache_descr (gdbarch);
> >   return descr->max_register_size;
> > }
> 
> things get pretty arbitrary.  Is "descr" a declaration or code body?

I find the break helpful to delimit the extent of the declarations.  I'm 
not too bothered if there is code in the declarations, provided it's 
straight-forward initializations, not complex conditional operations and 
the like.

R.

      reply	other threads:[~2003-05-03  9:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-02 10:10 Mark Kettenis
2003-05-02 17:32 ` Joel Brobecker
2003-05-02 18:46 ` Andrew Cagney
2003-05-03  9:54   ` Richard Earnshaw [this message]

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=200305030954.h439sDl04926@pc960.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=kettenis@chello.nl \
    /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).