AnsweredAssumed Answered

CW10 - Switch Statement code generation, V1

Question asked by William Hookway on Nov 18, 2010
Latest reply on Nov 19, 2010 by William Hookway

Hi,

I have a large switch statement and the generated code is using stack space (80 bytes), I cannot afford this, most of my threads call this routine.  I have organized the case values to be contiguous with no improvement, I do not know why the code is not a simple jump table at this point.  I noticed that others have posted this issue with previous versions of the compiler (CW8.1) and there was a pragma called switch_tables that allowed for control of how the case statement was implemented.  Is there a way to force the code generation of the switch statement?

Thanks,

Will

Outcomes