use of cast expressions as lvalues is deprecated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I use h8300-elf gcc 3.4.3

If I write the following:

void *qmemcpy(void *dst, register const void *src, register long len)
{
  register char *d;
  for (d = dst; --len >= 0; *d++ = *((char*)src)++) ; // warning here
  return dst;
}


I obtain:
qmemcpy.c: In function `qmemcpy':
qmemcpy.c(7) : warning: use of cast expressions as lvalues is deprecated


There exist a way to avoid the use of another variable to resolve this
warning?

thanks
-- 
Massimiliano Cialdi
cialdi@xxxxxxxxx
m.cialdi@xxxxxxxx

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux