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.

Clang or other overflow checking

I would like to ensure that arithmetic operations in my code do not overflow/underflow, which would obviously cause problems.  Does CCS support Clang or some sort of overflow checking (similar to __builtin_add_overflow)?

This seems like a Very Good Thing for embedded toolkits to have (like the MISRA checking that is already in there, which I very much appreciate!).

Thanks!

     -- Steve G.

  • Unfortunately, the TI compilers have no features which allow checking for overflow or underflow.

    Thanks and regards,

    -George

  • I understand.

    Then I'll ask two more questions:

    1) Does TI see value in this?

    2) Is there a plan to add this type of checking in the future?

    Thanks,
         -- Steve G.

  • Steve Goodrich said:
    1) Does TI see value in this?

    We don't think of it in such terms.  Rather, we tend to consider potential new features in terms of things like: How hard is it to implement?  What are the costs at runtime, or compile-time?  How many customers have requested or expect the feature?  With regard this feature, yours is the only customer request so far.  

    Steve Goodrich said:
    2) Is there a plan to add this type of checking in the future?

    Unfortunately, not at this time.

    Thanks and regards,

    -George