This (in my opinion valid) code returns error:
---------------------------------------------
typedef int (*DT)(void);
int f1(void);
int f2(void);
DT arr[] = {
(DT)f1,
(DT)f2
};
-------------------------------------
command line: sdcc -c -mz80 <filename.c>
Returns:
sdccerr.c:7: error 2: Initializer element is not constant
sdccerr.c:9: error 2: Initializer element is not constant
sdccerr.c:7: error 2: Initializer element is not constant
sdccerr.c:9: error 2: Initializer element is not constant
SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.2.1 #8331 (Jan 4 2013) (Linux)
Funny enough all ports but the mcs51 show this problem.
Fixed in reversion #9178.