#2112 Label breaks code


Just add or remove the label disp: to see the code break.
Code flow is broken somehow so that demonstration character counter aa counts 2 instead of 3 only when label is present.
This is stripped down from a small printf-like routine.
"z=%x" should output "3 characters" represented by the count in aa.
(I did this to avoid adding my output rooutines).

This is what I used:


SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08
3.2.1 #8227 (Nov 23 2012) (MINGW32)

C:\Silabs\SDCC\bin\sdcc.exe --model-large -c --debug --use-stdout -V -I"C:\Silabs\EZMacPRO\application\Test" "C:\Silabs\EZMacPRO\application\Test\main.c"

C:\Silabs\SDCC\bin\sdcc.exe --model-large --debug --use-stdout -V -I"C:\Silabs\EZMacPRO\application\Test" -o"C:\Silabs\EZMacPRO\application\Test\Dog.hex" "C:\Silabs\EZMacPRO\application\Test\main.rel"


  • workify

    workify - 2012-11-29
  • Erik Petrich

    Erik Petrich - 2012-11-29

    This is a problem with the parser taking only the label itself as the statement associated with the else clause rather than both the label and its following statement. As a temporary work-around, you can enclose both in braces:

    else {

  • Erik Petrich

    Erik Petrich - 2012-11-29
    • assigned_to: nobody --> epetrich
  • Erik Petrich

    Erik Petrich - 2012-12-01

    Fixed in revision #8232

  • Erik Petrich

    Erik Petrich - 2012-12-01
    • milestone: --> fixed
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks