From: Daniel Jacobowitz <drow@mvista.com>
To: David Carlton <carlton@math.stanford.edu>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: TYPE_VPTR_BASETYPE and TYPE_DOMAIN_TYPE
Date: Thu, 22 Aug 2002 13:46:00 -0000 [thread overview]
Message-ID: <20020822204648.GA31816@nevyn.them.org> (raw)
In-Reply-To: <ro1n0repr26.fsf@jackfruit.Stanford.EDU>
On Thu, Aug 22, 2002 at 01:38:25PM -0700, David Carlton wrote:
> What's the deal with TYPE_VPTR_BASETYPE and TYPE_DOMAIN_TYPE being the
> same thing? Did struct main_type once contain two different members
> that got merged? It seems like a potential source of confusion right
> now (it certainly slowed me down when tracking down a recent bug).
>
> It seems like there are two obvious fixes. If we're not planning to
> split them back apart in the near future, then either
> TYPE_VPTR_BASETYPE or TYPE_DOMAIN_TYPE should be elimininated. If we
> want to leave open the possibility of splitting them back apart,
> however, then the comment before the definition of the vptr_basetype
> field should be emended to say when you're supposed to use
> TYPE_VPTR_BASETYPE to access it and when you're supposed to use
> TYPE_DOMAIN_TYPE to access it. (And, of course, all uses should be
> checked to make sure they follow that recommendation.)
>
> I'd be happy to make either of those changes, if people agree that one
> of them is a good idea.
As I understand it TYPE_DOMAIN_TYPE applies to methods, but
TYPE_VPTR_BASETYPE definitely only has meaning for structures.
Probably just the comment needs to be updated. Now it's:
For types that are pointer to member types (TYPE_CODE_MEMBER),
VPTR_BASETYPE is the type that this pointer is a member of.
For method types (TYPE_CODE_METHOD), VPTR_BASETYPE is the aggregate
type that contains the method.
Can you think of any time where having both would be useful?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-08-22 20:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-22 13:38 David Carlton
2002-08-22 13:46 ` Daniel Jacobowitz [this message]
2002-08-22 15:24 ` David Carlton
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=20020822204648.GA31816@nevyn.them.org \
--to=drow@mvista.com \
--cc=carlton@math.stanford.edu \
--cc=gdb@sources.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