From: Tom Tromey <tromey@redhat.com>
To: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFC] examine for TYPE_CODE_REF in pascal language PR 11349
Date: Fri, 30 Apr 2010 16:59:00 -0000 [thread overview]
Message-ID: <m3y6g4zxkr.fsf@fleche.redhat.com> (raw)
In-Reply-To: <17731.9300863475$1272644394@news.gmane.org> (Pierre Muller's message of "Fri, 30 Apr 2010 18:19:37 +0200")
>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:
Pierre> -inside x_command, a TYPE_CODE_REF generates a call
Pierre> to value_ind, but this generates possibly several dereferencing
Pierre> if the target type is also a pointer.
Pierre> I do not know what is the expectation for C language
Pierre> here, and I don't even know how to generate code that
Pierre> has variables of type TYPE_CODE_REF from C source.
You need C++ to make a TYPE_CODE_REF. It corresponds to a C++
reference.
Pierre> Should this change be extended to other languages
Pierre> or to all languages?
I think coerce_ref is the right thing to do here for C++. If an
expression evaluates to a reference to a pointer, I would expect the
reference to be ignored and the referred-to pointer to be used instead.
However, the fact that the code is explicitly written to check
TYPE_CODE_REF and use value_ind gives me pause. If you change it to
unconditionally use coerce_ref, do any tests fail?
Tom
next parent reply other threads:[~2010-04-30 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <17731.9300863475$1272644394@news.gmane.org>
2010-04-30 16:59 ` Tom Tromey [this message]
2010-05-02 23:01 ` [RFA] examine for TYPE_CODE_REF (PR 11349) Pierre Muller
2010-05-03 17:40 ` Tom Tromey
2010-05-04 6:52 ` Pierre Muller
2010-05-04 14:22 ` Joel Brobecker
2010-04-30 16:19 [RFC] examine for TYPE_CODE_REF in pascal language PR 11349 Pierre Muller
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=m3y6g4zxkr.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/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).