From: Jason Merrill <jason@redhat.com>
To: David Krauss <potswa@mac.com>
Cc: gcc-patches@gcc.gnu.org, Jason Merrill <jason@gcc.gnu.org>
Subject: Re: [PATCH] [Bug c++/49118] fake template nesting for operator-> chain
Date: Mon, 06 Jun 2011 20:28:00 -0000 [thread overview]
Message-ID: <4DED386B.1010602@redhat.com> (raw)
In-Reply-To: <5902DD14-F11F-49ED-8C86-7DEB076DCC65@mac.com>
On 06/02/2011 03:25 PM, David Krauss wrote:
> Optimally the re-opened context would be the preceding operator-> function itself, to create the illusion of nested calls. However, the result of build_new_op may be a target_expr or a call_expr. I'm not sure of the best way to recover the function declaration from this ambiguous tree, nor whether it would a performance issue (i.e., too much work for the reward).
For a CALL_EXPR you can use get_callee_fndecl. I wouldn't object to
teaching it to handle TARGET_EXPR and AGGR_INIT_EXPR as well.
As for the duplicate error message, that happens because we complain
when doing push_tinst_level first in instantiate_decl and then again in
build_x_arrow. To avoid this we would need to hit each new depth first
in build_x_arrow, either by pushing and then popping again before the
call the build_new_op, or adding something like
suspend/resume_tinst_level to pt.c.
Jason
next prev parent reply other threads:[~2011-06-06 20:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-49118-18186@http.gcc.gnu.org/bugzilla/>
[not found] ` <bug-49118-18186-fnN8jlsJie@http.gcc.gnu.org/bugzilla/>
2011-06-02 19:26 ` David Krauss
2011-06-06 20:28 ` Jason Merrill [this message]
2011-06-09 23:43 ` David Krauss
2011-06-10 3:00 ` Jason Merrill
2011-06-10 3:29 ` David Krauss
2011-06-10 6:50 ` Jason Merrill
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=4DED386B.1010602@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@gcc.gnu.org \
--cc=potswa@mac.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).