From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10454 invoked by alias); 22 Nov 2004 20:45:49 -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 10429 invoked from network); 22 Nov 2004 20:45:46 -0000 Received: from unknown (HELO mprelay.uc.edu) (129.137.3.48) by sourceware.org with SMTP; 22 Nov 2004 20:45:46 -0000 Received: from [172.30.6.107] (zhivago.erc-wireless.uc.edu [172.30.6.107]) by mprelay.uc.edu (MOS 3.4.7-GR) with ESMTP id CAK92155; Mon, 22 Nov 2004 15:45:38 -0500 (EST) In-Reply-To: <9CD04F70-3CC6-11D9-B847-000D9330C50E@apple.com> 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> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <7688EB08-3CC7-11D9-AEB4-000A95D692F4@physics.uc.edu> Content-Transfer-Encoding: 7bit Cc: Steve Naroff , gcc mailing list , Matt Austern , Michael Matz , Joe Buck , Mike Stump From: Andrew Pinski Subject: Re: generalized lvalues -- patch outline Date: Mon, 22 Nov 2004 21:01:00 -0000 To: Ziemowit Laski X-SW-Source: 2004-11/txt/msg00756.txt.bz2 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]). Thanks, Andrew Pinski