From: Vangelis R. <vr...@ot...> - 2004-06-06 20:50:36
|
On Sunday 06 June 2004 20:18, George M. Gallant wrote: > I applied sdcc 20046605 to a medium sized project that was developed > with mcc. I compile > to asm so that the output is readable. Some observations: > > 1. If an array is declared in a module but never actually used, the > compiler generates a global declaration but does not create the variable > proper. Work around is to create a dummy procedure that zeros the variables. No dummy procedure. It was a bug of the port. It is fixed now. I'll update the CVS later this evening. > 2. The following snippet compiles but dies in gpasm due to an > undefined label. It generates a return address on the hardware stack using > _000144_DS_ but does not generate the label. > > if (fp != NULL) (fp)(); Another bug. This time the label was optimised out by pCode optimiser. I don't know why Hans (who rewrote the specific section) didn't trace the bug. Probably he didn't try the if-statement before calling fp(). The missing label is exactly before the label where if- jumps if test is false, so we have two labels in a row (and in fact, the first, the return point, is not referenced explicit in the source!). So the optimiser thinks that its good to remove one of them. Guess which was chosen;-) ANW, I fixed that too, you'll find it in the CVS in a few hours. > 3. The make install in the device/pic16 clobbers the asm files. Not > so nice for us who add their own > asm entries to the libaries or who want to debug the libs!!!! I don't understand what you mean here. You can always rebuild the pic16 libraries if you run 'make' in the device/lib/pic16 directory. I hope this helps. Regards, Vangelis |