From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31859 invoked by alias); 30 Oct 2012 15:05:01 -0000 Received: (qmail 31725 invoked by uid 22791); 30 Oct 2012 15:04:59 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Oct 2012 15:04:49 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9UF4m1e007948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Oct 2012 11:04:48 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9UF4k0I013146 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 30 Oct 2012 11:04:47 -0400 From: Tom Tromey To: Jonathan Wakely Cc: gdb@sourceware.org Subject: Re: PR symtab/14441 - rvalue references References: Date: Tue, 30 Oct 2012 15:05:00 -0000 In-Reply-To: (Jonathan Wakely's message of "Sun, 28 Oct 2012 20:34:40 +0000") Message-ID: <87wqy8xapd.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00117.txt.bz2 >>>>> "Jonathan" == Jonathan Wakely 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