7 static int cmp_eq (long arg1
, long arg2
)
13 void (*op_func
)(void);
16 /* In initializations, SDCC did not allow some function pointer casts allowed by the standard. */
18 const struct op string_binop1
[] = {
19 {"=", (void (*)(void*))cmp_eq
},
22 const struct op string_binop2
[] = {
23 {"=", (void (*)(void*))&cmp_eq
},
30 #if !defined(__SDCC_mcs51) && !defined(__SDCC_ds390) && !defined(__SDCC_hc08) && !defined(__SDCC_s08) && !defined(__SDCC_mos6502) && !defined(__SDCC_mos65c02) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) /* mcs51, hc08, s08 and pdk14 have restrictions on function pointers wrt. reentrancy */
31 ASSERT(((int (*)(long, long))(string_binop1
[0].op_func
))(1, 1) == 0);
32 ASSERT(((int (*)(long, long))(string_binop1
[0].op_func
))(1, 2) == 1);
33 ASSERT(((int (*)(long, long))(string_binop2
[0].op_func
))(1, 1) == 0);
34 ASSERT(((int (*)(long, long))(string_binop2
[0].op_func
))(1, 2) == 1);