[U-Boot-Users] old code compiled with new gcc. error: lvalue required

Howdy, 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. There are many exact same compile-time errors reported: error: lvalue required as increment/decrement operand. xsum += *((ushort *)ptr)++;
*((ulong *)addr_sp)-- = 0;
...
There are about 20 errors. Is there any walkaround? eg, compile options to gcc that can use old C standard.
Again, a very obscure code: viod some_func(ushort* ptr,...) { ... switch(SWAP16(*((ushort *)ptr)++) // @_@ how to deal with the side-effect of ++? { case ...: ptr2 = ptr; // ptr is ++-ed of to-be ++ ? CallSomeOtherFunction(); // When calling, how about ptr.... ... } }
Thank you for your attention. --- ShenLei

In message cdb837ea0805140219v303e5d36v6b0e7591944ac279@mail.gmail.com you wrote:
I want to compile ppcboot 1.1.6 by ELDK 4.1. Well, ppcboot is very
That's similar to asking the Wright Bothers to fly an A380. In short: it will not work.
There are about 20 errors. Is there any walkaround? eg, compile options to gcc that can use old C standard.
For old code, use an old toolchain.
------=_Part_847_16156442.1210756781558 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
And don't post HTML here.
Best regards,
Wolfgang Denk
participants (2)
-
Wolfgang Denk
-
甜瓜