I have researched the problem described below and not found reference to it before - hence the bug report.
SDCC complier version 2.6.0 #4039 (July 28 2006)
I don't know if it is a linker or optimiser issue so have placed this report in the mcs51 category.
I have discovered that if a switch statement contains an in-line assembler block (within a case...break statement) which happens to contain a code label, as per this example...
P0 = 0xFB ;
P0 = 0xFE ;
then the following error message is produced (one of several examples produced for the above code):
?ASxxxx-Error-<u> in line 1047 of Switch.asm
<u> undefined symbol encountered during assembly
Note: The presence or not of real lines of assembler code have no effect - only removing the label is effective at clearing the error.
Examination of the asm file reveals that the switch statement jump labels, although appearing in the asm file, are reported as 'undefined'.
I attach all files needed to compile the above project.
Log in to post a comment.