public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: PR symtab/14441 - rvalue references
Date: Tue, 30 Oct 2012 15:05:00 -0000	[thread overview]
Message-ID: <87wqy8xapd.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CAH6eHdRRCnd0PtKZT09UiYKWgc2OS7g+WW9MBXhaTx00=YCdrg@mail.gmail.com>	(Jonathan Wakely's message of "Sun, 28 Oct 2012 20:34:40 +0000")

>>>>> "Jonathan" == Jonathan Wakely <jwakely.gcc@gmail.com> writes:

Jonathan> My first attempt, shown in the attachment, was very simple:
[...]
Jonathan> * adjust c_type_print_varspec_prefix() to print "&&" when type ==
Jonathan> TYPE_RVALUE_REFERENCE_TYPE (TYPE_TARGET_TYPE (type)) i.e. when the
Jonathan> reference being printed is the target type's rvalue_reference_type,
Jonathan> not its reference_type.

The above seems weird to me somehow.
I wonder why it didn't work.
FWIW a flag bit on struct main_type would be ok.

Jonathan> Unfortunately my first attempt at doing that didn't work, so I
Jonathan> started adding TYPE_CODE_RVAL_REF and handling it everywhere
Jonathan> ... but I'm having second thoughts.

Yeah.  That patch would be fairly large.
If you want to persevere, though, I will review it, despite its eventual
size.  But like I said, I think either way is ok.

It seems like the expression parser should at least need one change to
parse the new type, so that "ptype int&&" works.

Tom

      parent reply	other threads:[~2012-10-30 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28 20:34 Jonathan Wakely
2012-10-29 14:54 ` Tom Tromey
2012-10-29 23:40   ` Jonathan Wakely
2012-10-30 15:05 ` Tom Tromey [this message]

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=87wqy8xapd.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=jwakely.gcc@gmail.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).