This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: generalized lvalues -- patch outline


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]