This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unsupported GCC extension

I have a need for the gcc c extension "Labels as values". I see it is not supported in the TI compiler. Is there plans to add this or do you have any thoughts how I might emulate this feature? Thanks.

  • Mark Flamer said:
    Is there plans to add this

    Not at this time.

    Mark Flamer said:
    do you have any thoughts how I might emulate this feature?

    Consider using a switch statement instead.  If you are using an ARM or MSP430 device, you could build with those GCC compilers instead of TI.

    Thanks and regards,

    -George

  • Yes, a simple switch statement would work. Typically it takes a few more instructions to do a switch because the compiler inserts range checking into the generated code. Thats why many fast interpreters look for a way to do an indirect jump, which is what the "Labels as Values" gets you. Unfortunatly I also need to build with RTOS, so GCC is not an option. Thanks for the answer.