From: Pedro Alves <pedro@codesourcery.com>
To: tromey@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] New qRelocInsn RSP packet, docs and NEWS.
Date: Thu, 27 May 2010 21:03:00 -0000 [thread overview]
Message-ID: <201005272143.39486.pedro@codesourcery.com> (raw)
In-Reply-To: <m36329f5e4.fsf@fleche.redhat.com>
On Thursday 27 May 2010 21:37:07, Tom Tromey wrote:
> My concern is that duplicate declarations lead to bugs, because they can
> insulate a module from changes to an API it uses. Ideally, I think that
> all non-static objects ought to have a single declaration in a single
> header file, which is included by all users.
Oh, you know I agree with that! :-) I didn't remember that tracepoint.c
was using this function, and since I had written this a while ago, I
had forgotten/missed why the declaration I was adding didn't
have a "static" qualifier.
> Exactly where something lives is secondary to me. I do think it is
> generally better for generic functions to be somewhere like utils.c.
> The only real failure mode to a bad placement is a bit of code
> duplication, though, and that isn't as serious a problem, at least not
> for "leaf" things like this.
Yep, agreed on all accounts; I've written a patch to move the
declaration to a header. I've left moving the functions somewhere
else for another day; it doesn't seem to add much benefit today.
--
Pedro Alves
next prev parent reply other threads:[~2010-05-27 20:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-24 15:30 Pedro Alves
2010-05-24 18:23 ` Eli Zaretskii
2010-05-26 18:28 ` Pedro Alves
2010-05-25 16:55 ` Joel Brobecker
2010-05-27 19:58 ` Tom Tromey
2010-05-27 20:14 ` Pedro Alves
2010-05-27 20:39 ` Tom Tromey
2010-05-27 21:03 ` Pedro Alves [this message]
2010-05-27 20:43 ` Pedro Alves
2010-06-01 19:10 ` Tom Tromey
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=201005272143.39486.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--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