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.
Tool/software: TI C/C++ Compiler
Dear All
I have the following question
If all optimisations are disabled, are all the variables of type volatile by default?
Or even so for critical variables there is the need to declare as volatile?
Thanks
Luis Gonçalves
user4957458 said:If all optimisations are disabled, are all the variables of type volatile by default?
No
user4957458 said:Or even so for critical variables there is the need to declare as volatile?
If a variable might change values due to something the compiler cannot control, then it needs to be marked volatile. This is true without regard for whether optimization is used or not. For further details please see this article.
Thanks and regards,
-George