TSL - 2013-09-26

UPDATE:
Added to bug tracker - PLEASE DELETE.
Sorry for that.


Hi!
Found a bug:

char i;
void main(void)
{
i = 0;

while (1)
    i = (i == 3) ? 0 : (i + 1);

}

compiled like that:

_main:
;1.c:9: i = 0;
ld hl,#_i + 0
ld (hl), #0x00
;1.c:11: while (1)
00102$:
;1.c:13: i = (i == 3) ? 0 : (i + 1);
ld a,(#_i + 0)
cp a,#0x03
jr Z,00107$
inc a
00107$:
ld (#_i + 0),a
jr 00102$
_main_end::

The instruction cp a,#0x03 must obviously be sub a,#0x03.

This bug is present in versions 3.1.0 thru 3.3.0. Absent in 3.0.0.

Please add it to the bug tracker.
Thank you!

 
Last edit: TSL 2013-09-26