This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: generalized lvalues -- patch outline
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Matt Austern <austern at apple dot com>
- Cc: gcc at gcc dot gnu dot org,Mark Mitchell <mark at codesourcery dot com>,Steve Naroff <snaroff at apple dot com>,Michael Matz <matz at suse dot de>,Ziemowit Laski <zlaski at apple dot com>,Joe Buck <Joe dot Buck at synopsys dot com>,Andrew Pinski <pinskia at physics dot uc dot edu>,Mike Stump <mrs at apple dot com>
- Date: Tue, 23 Nov 2004 09:36:53 +0100
- Subject: Re: generalized lvalues -- patch outline
- References: <4D2CF60C-3919-11D9-8BD2-000A95BCF344@apple.com> <41A27FA4.2000107@codesourcery.com> <DCE78ED4-3CEC-11D9-9441-000393B2ABA2@apple.com>
> Partly depends on what the value of "..." actually is. I'd be
> interested in seeing whether other compilers (EDG? IBM? Sun? HP?)
> support this extension.
poog% cat ext.c
void foo(char *p)
{
*((long *) p)++ = 1;
}
poog% cc -S ext.c
"ext.c", line 3: warning: a cast does not yield an lvalue
poog% cc -V
cc: Sun C 5.5 Patch 112760-14 2004/09/28
The assembly code looks correct (full word stored, p is incremented by 4).
--
Eric Botcazou