Re: GCC 4 Woes

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

 



On Thu, 2005-04-14 at 16:04 -0400, Gregory Hayes wrote:
> In my quest to play my DivX files under FC4t2 I found that I can't get
> either MPlayer or Xine to compile (old RPMs for FC3 from livna won't
> work). GCC usually dies with this error:
> 
> error: invalid lvalue in increment
> 
> As an example, below is a line of code that generates this: 
> 
>     n1  = *(((unsigned int *) src1)++);
> 
> What is the correct way to do the same thing under GCC 4 w/o
> triggering the above error?

Split up (1) the assignment of *src1 -> n1, and (2) the increment of
src1 into two distinct lines of code.  gcc 4 tightens handling of
lvalues and rvalues, which this code is abusing.

dan



[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]