Re: lvalue required as increment operand

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

 



On Tue, Jun 18, 2013 at 11:01 PM, vijay nag <vijunag@xxxxxxxxx> wrote:
>
> Consider the following expression
>
> char *foo = &bar;
> ((unsigned long*)foo)++

I think the correct way to get the same effect these days is not what
you suggested, but rather something like
    foo = (char *) (((unsigned long*)foo) + 1);

Ian




[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