Compiling with
sdcc-sdcc -mz80 -c main.c
the file main.c:
void nothing(int n)
{
n;
}
void
main()
{
int i;
i;
// comment the for-loop out
for(i=10; i<18; i++){
nothing(i);
}
// comment the for-loop out
__asm
00001$:
call _nothing
jr 00001$
ret
__endasm;
}
gets the error:
main.c:25: info 218: z80instructionSize() failed to parse line node, assuming 999 bytes
'00001$:'
If you comment the for-loop out the error message dissapears.
It's probably a bug.
The error appears only in combination with a c-loop.
Best regards.
Harry
It's a old bug.
Have a look at:
https://sourceforge.net/p/sdcc/bugs/2977/
And was obviosly not fixed with: [r13121]
Which version of sdcc did you use? On which host platform? Neither this code nor the one from [bugs:#2977] give me the error using current sdcc from svn on my Debian GNU/Linux testing system.
Related
Bugs:
#2977I' working on a Fedora 37 Workstation. It's sdcc version is 4.1.0.
There is the same problem with the new compiled 4.2.0 version.
Same with https://sourceforge.net/p/sdcc/bugs/2977/
So this likely is indeed a duplicate of [bugs:#2977], which got fixed in [r13121]. The 4.2.0 release was in late March 2022, the fix in early May 2022.
Related
Bugs:
#2977Oh, o.k. Philipp, thank's a lot.
There is no stable release with the fix.
So I had to use the snapshot?
Greetings Harry
Snapshot or compile from svn trunk.
They should be quite stable now (we haven't had any big changes recently, and are preparing for the 4.3.0 release, though there is no official release candidate yet).
Diff: