Howdy,<br>&nbsp;&nbsp;&nbsp;&nbsp; I want to compile ppcboot 1.1.6 by ELDK 4.1. Well, ppcboot is very ancient code, but for some reason, I have to compile it.<br>There are many exact same compile-time errors reported:<br>error: lvalue required as increment/decrement operand.<br>
&nbsp;&nbsp; xsum += *((ushort *)ptr)++;<br><br>&nbsp;&nbsp; *((ulong *)addr_sp)-- = 0;<br><br>&nbsp;&nbsp; ...<br><br>There are about 20 errors. Is there any walkaround?&nbsp; eg, compile options to gcc that can use old C standard.<br><br>Again, a very obscure code:<br>
viod some_func(ushort* ptr,...)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp;&nbsp; switch(SWAP16(*((ushort *)ptr)++)&nbsp;&nbsp;&nbsp; // @_@ how to deal with the side-effect of ++?<br>&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp; case ...:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ptr2 = ptr; // ptr is ++-ed of to-be ++ ?<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CallSomeOtherFunction();&nbsp; // When calling, how about ptr....<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br>}<br><br><br>&nbsp;&nbsp; Thank you for your attention.<br>---<br>ShenLei&nbsp;  <br><br>