From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20767 invoked by alias); 22 Nov 2004 20:54:38 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 20225 invoked from network); 22 Nov 2004 20:54:17 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org with SMTP; 22 Nov 2004 20:54:17 -0000 Received: from mailgate2.apple.com (a17-128-100-204.apple.com [17.128.100.204]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id iAML15Ph023393 for ; Mon, 22 Nov 2004 13:01:05 -0800 (PST) Received: from relay4.apple.com (relay4.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.3.14) with ESMTP id ; Mon, 22 Nov 2004 12:54:16 -0800 Received: from [17.201.24.57] (polskifiat.apple.com [17.201.24.57]) by relay4.apple.com (8.12.11/8.12.11) with ESMTP id iAMKsD9e001614; Mon, 22 Nov 2004 12:54:14 -0800 (PST) In-Reply-To: <7688EB08-3CC7-11D9-AEB4-000A95D692F4@physics.uc.edu> References: <4D2CF60C-3919-11D9-8BD2-000A95BCF344@apple.com> <20041117212847.A26376@synopsys.com> <6F5FC748-7BBD-44B9-8DDC-246949F16102@apple.com> <20041118102741.A8347@synopsys.com> <77E8D36A-C0C2-4B03-964C-BEE0FE7BBBC3@apple.com> <98C86CD4-39E2-11D9-B2D5-000A95BCF344@apple.com> <20041119170011.A30410@synopsys.com> <9E6AD708-3A93-11D9-9070-000D9330C50E@apple.com> <20041119174042.A1311@synopsys.com> <90DC5074-3A96-11D9-9070-000D9330C50E@apple.com> <9CD04F70-3CC6-11D9-B847-000D9330C50E@apple.com> <7688EB08-3CC7-11D9-AEB4-000A95D692F4@physics.uc.edu> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <84283265-3CC8-11D9-B847-000D9330C50E@apple.com> Content-Transfer-Encoding: 7bit Cc: Steve Naroff , gcc mailing list , Matt Austern , Michael Matz , Joe Buck , Mike Stump From: Ziemowit Laski Subject: Re: generalized lvalues -- patch outline Date: Mon, 22 Nov 2004 21:11:00 -0000 To: Andrew Pinski X-SW-Source: 2004-11/txt/msg00757.txt.bz2 On 22 Nov 2004, at 12.45, Andrew Pinski wrote: > > On Nov 22, 2004, at 3:39 PM, Ziemowit Laski wrote: > >> On 19 Nov 2004, at 17.50, Ziemowit Laski wrote: >> >>> To put it another way, I'm only concerned with cases where the >>> compiler currently complains >>> about assigning to a non-lvalue, and the non-lvalue in question is a >>> cast of an lvalue. >> >> Indeed, I now appear to have a mainline mod for C and C++ which >> allows assignment to lvalue casts for pointer types. What follows is >> a high-level synopsis of what I did; if there is interest, I can whip >> up a full-fledged patch, complete with docs. Please let me know. > > > Just use a builtin as proposed by Nathan and others for the problem you > are trying to solve. The syntax for casts as lvalue just looks bad. > The builtin can return a reference (yes even in the C front-end you > can have references [varargs is an example of which is used as > references in the front-end]). Here's hoping you'll get a chance to work with real third-party code some day... :-) --Zem