7 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // pdk needs function pointer to be reentrant even for a single argument
8 typedef int (*DT
)(int);
10 unsigned int f1(unsigned int c
)
20 DT gpfunc
[] = {(DT
) f1
, f2
};
25 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15)
26 DT lpfunc
[] = {(DT
) f1
, f2
};
27 DT spfunc
[] = {f2
, (DT
) f1
};
29 ASSERT (gpfunc
[0](0x55) == 0x56);
30 ASSERT (gpfunc
[1](0x66) == 0x68);
31 ASSERT (lpfunc
[0](0x77) == 0x78);
32 ASSERT (lpfunc
[1](0x44) == 0x46);
33 ASSERT (spfunc
[0](0x11) == 0x13);
34 ASSERT (spfunc
[1](0x22) == 0x23);