Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tom@tromey.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH] Make BLOCK_START and BLOCK_END into rvalues
Date: Sun, 17 May 2020 08:05:05 -0600	[thread overview]
Message-ID: <87pnb264j2.fsf@tromey.com> (raw)
In-Reply-To: <edb8c0bb-a21a-40be-b63c-20b2ddd27ed6@simark.ca> (Simon Marchi's message of "Sat, 16 May 2020 12:15:03 -0400")

Simon> This is similar to what I'm doing to struct type, so it would be nice to agree
Simon> on the way forward for all these structures, and change them in a consistent
Simon> manner.

Makes sense.

Simon> Since you are changing the places that modify the field values, I'd suggest
Simon> adding the setter right away, it's a step in the right direction.

Simon> And I'd suggest adding the getter too, changing the BLOCK_START macro to use
Simon> it, it shouldn't be much more work.  And it will achieve the goal of making
Simon> the macro yield an rvalue.

I wasn't sure whether setters and getters would provide any real value.
Aside from some maybe-future idea of changing the getter, in other
situations they are just wrappers for the field.

For struct type, maybe it makes more sense, because one (very-)
long-term idea there would be to split up struct main_type into an
inheritance hierarchy, so that each type can be more obviously
type-safe, and also carry just the data it needs.

I don't mind making the change -- it's easy enough to do.

Tom


  reply	other threads:[~2020-05-17 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 15:10 Tom Tromey
2020-05-16 16:15 ` Simon Marchi
2020-05-17 14:05   ` Tom Tromey [this message]
2020-05-17 14:40     ` Simon Marchi
2020-05-16 16:36 ` Christian Biesinger

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=87pnb264j2.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /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