From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32474 invoked by alias); 23 Nov 2004 20:05:09 -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 32094 invoked from network); 23 Nov 2004 20:04:52 -0000 Received: from unknown (HELO mail.libertysurf.net) (213.36.80.90) by sourceware.org with SMTP; 23 Nov 2004 20:04:52 -0000 Received: from dyn-83-156-222-3.ppp.tiscali.fr (83.156.222.3) by mail.libertysurf.net (7.1.026) id 41A307DC00088BEA; Tue, 23 Nov 2004 21:04:48 +0100 From: Eric Botcazou To: Matt Austern Subject: Re: generalized lvalues -- patch outline Date: Tue, 23 Nov 2004 21:10:00 -0000 User-Agent: KMail/1.6.1 Cc: gcc@gcc.gnu.org, Nathan Sidwell , Steve Naroff , Michael Matz , Ziemowit Laski , Joe Buck , Andrew Pinski , Mike Stump References: <4D2CF60C-3919-11D9-8BD2-000A95BCF344@apple.com> <41A342FF.2080600@codesourcery.com> <8E7AE4A7-3D81-11D9-BE41-000A95AA5E5E@apple.com> In-Reply-To: <8E7AE4A7-3D81-11D9-BE41-000A95AA5E5E@apple.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200411232100.57977.ebotcazou@libertysurf.fr> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00844.txt.bz2 > I haven't looked at that list, but one data point: CW restricts this > cast to pointers, so that's good enough for CW compatibility. I guess > we learned just today (thanks, Eric!) that Solaris supports some > version of this extension, at least for C. We don't yet know the > boundaries of Sun's version of the extension. Since you so kindly asked... :-) Sun seems to restrict it to pointers too, i.e. it rejects (short)v = 1 as well as: void bar(unsigned long addr) { *((int *)addr)++ = 1; } with: "ext.c", line 8: a cast does not yield an lvalue cc: acomp failed for ext.c Here's the reaction of the C++ compiler: poog% cat ext.C void foo(char *p) { *((long *) p)++ = 1; } poog% CC -S ext.C "ext.C", line 3: Error: Operand for operator "++" must be an lvalue. 1 Error(s) detected. -- Eric Botcazou