I'm trying to compile a simple C source file,
which was generated by cito (Ć Programming Language) translator (Ć --> C).
But i got an error:
the SDCC C compiler think (for some reason), what an initializer is not const, but it is const.
Check the C source file object.c (attached).
Original ci source file is attached too object.ci.cpp (just in case).
SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.3.1 #8699 (May 31 2013) (Linux)
cito -l c -o ./object.c ./object.ci.cpp
sdcc -mz80 ./object.c
./object.c:29: error 2: Initializer element is not constant
./object.c:31: error 2: Initializer element is not constant
./object.c:61: warning 85: in function GameObj_Move unreferenced function argument : 'self'
./object.c:86: warning 85: in function MovingGameObj_Draw unreferenced function argument : 'self'
So, in the error lines, the are two pointers to function (which is const), used as initializers.
But compiler, for some reason, see this pointers as non-const.