2007-07-25 07:24 PM
Bug with array of pointers to functions in Cosmic V4.5.5?
2007-07-22 05:27 PM
I think I may have found a bug in the Cosmic compiler V4.5.5. This indirect call with one parameter compiles perfectly:
******************************* int FunctionOne(unsigned int x) { } void main(void) { int FunctionOne(unsigned int); const int (*jumpTable[])(unsigned int) = { &FunctionOne }; jumpTable[0](1); } ******************************* But, when you add another parameter, the compiler says ''invalid indirect call'': ******************************* int FunctionTwo(unsigned int x, unsigned int y) { } void main(void) { int FunctionTwo(unsigned int, unsigned int); const int (*jumpTable[])(unsigned int, unsigned int) = { &FunctionTwo }; jumpTable[0](1, 2); } ******************************* Am I doing something wrong? -David2007-07-23 09:33 PM
2007-07-25 07:24 PM
Thank you!