From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30708 invoked by alias); 22 Nov 2004 22:11:35 -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 28017 invoked from network); 22 Nov 2004 22:10:21 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org with SMTP; 22 Nov 2004 22:10:21 -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 iAMMH8YN008785 for ; Mon, 22 Nov 2004 14:17:08 -0800 (PST) Received: from relay2.apple.com (relay2.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.3.14) with ESMTP id for ; Mon, 22 Nov 2004 14:10:19 -0800 Received: from [17.201.24.57] (polskifiat.apple.com [17.201.24.57]) by relay2.apple.com (8.12.11/8.12.11) with ESMTP id iAMMAG1k021726; Mon, 22 Nov 2004 14:10:16 -0800 (PST) In-Reply-To: <41A253A2.1050205@codesourcery.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> <41A253A2.1050205@codesourcery.com> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <24BB97A2-3CD3-11D9-B847-000D9330C50E@apple.com> Content-Transfer-Encoding: 7bit Cc: Steve Naroff , gcc mailing list , Matt Austern , Michael Matz , Joe Buck , Andrew Pinski , Mike Stump From: Ziemowit Laski Subject: Re: generalized lvalues -- patch outline Date: Mon, 22 Nov 2004 22:33:00 -0000 To: Nathan Sidwell X-SW-Source: 2004-11/txt/msg00764.txt.bz2 On 22 Nov 2004, at 13.01, Nathan Sidwell wrote: > Ziemowit Laski wrote: >> 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. > > Please describe the semantics *in detail* of what you are trying to > achieve. Why are the modify-assignment operators not allowed? That > appears non-orthogonal. Modify-assignment is (or should be; I'll check) allowed. The semantics are that a C-style cast of an lvalue will itself be treated as an lvalue under the following circumstances: - The lvalue cast does not induce a type conversion (if it does, then we use the type conversion instead); - The lvalue cast is being assigned to, incremented or decremented; - The lvalue is of a pointer type, and is being cast to a pointer type. (This will need to be relaxed somewhat should people desire Microsoft compatibility, at least for C.) Of course, all of this only with the -flvalue-cast-assign flag specified. --Zem