I have following codes: void fun1(unsigned char *msg); void fun2() { fun1("ssss"); } void fun3() { } code void (*func_array[])()={fun2, fun3}; void fun1( unsigned char *msg) { (*func_array[1])(); } void main() { (*fun_array[0])(); } when compiling, i got the following message *** WARNING L13: RECURSIVE CALL TO SEGMENT SEGMENT: ?CO?HELLO Could you please tell me how to solve it? Thanks a lot!
Dan: "... codify the function pointer array at the cost of an additional pushed return address." Drew: "It's perhaps worth noting that a switch statement such as the one Dan posted generally compiles into a jump table anyway." And when it compiles into a jump table, it does not cost an additional pushed return address.