Compilation error

Mike Frysinger vapier at gentoo.org
Sat Sep 15 10:06:52 UTC 2007


On Saturday 08 September 2007, kannappan at tesbv.com wrote:
> i have the following piece of code which gives compilation error (like
> lvalue requried...)  may be bug with the compiler
>
> uchar *s;
>
> *((ushort *)s)++ = val;
>
> if i change that to
>   *(ushort *)s = val;
>   s+=2;
>
> it works fine.
>
> I am using uclibc 0.9.29, gcc 4.1.2, binutils 2.17.

the system libc is irrelevant so in the future, please post your code 
questions to one of the gcc mailing lists (like gcc-help) ... but as already 
noted, the code here is just plain wrong
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070915/3e17c974/attachment-0002.pgp 


More information about the uClibc mailing list