Syntax error

Bug reports (if you don't/won't have a Github account)
Post Reply
einar
Member
Posts: 47
Joined: Fri Sep 06, 2013 4:23 pm

Syntax error

Post by einar »

Program test.c:

Code: Select all

#include <arch/spectrum.h>

main()
{
    *((unsigned int *)64992) = 0xc9fb;
    zx_border(5);
}
Compile options:

Code: Select all

zcc +zx -vn -startup=1 -clib=new test.c -o test -O3
Obtained result:

Code: Select all

1 errors occurred during assembly
Errors in source file test.c:
Error at file 's5ss_.opt' line 21: syntax error
                   ^ ----       ld      (64992  ;const),hl
Notice there's a comment ";const" inside the instruction itself. Compiling the same program without "-O3" works properly.

Tested against latest "z88dk-win32-20151211.zip".
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

Thanks -- fixed in Dec 12 build
einar
Member
Posts: 47
Joined: Fri Sep 06, 2013 4:23 pm

Post by einar »

Thank you!
Post Reply