Howdy,<br> 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>
xsum += *((ushort *)ptr)++;<br><br> *((ulong *)addr_sp)-- = 0;<br><br> ...<br><br>There are about 20 errors. Is there any walkaround? 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> ...<br> switch(SWAP16(*((ushort *)ptr)++) // @_@ how to deal with the side-effect of ++?<br> {<br> case ...:<br> ptr2 = ptr; // ptr is ++-ed of to-be ++ ?<br>
CallSomeOtherFunction(); // When calling, how about ptr....<br> ...<br> }<br>}<br><br><br> Thank you for your attention.<br>---<br>ShenLei <br><br>