메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

Do I attach volatile declaration whose values are change externally?

Latest Updated:12/01/2011

Question:

I have set the optimization level to "Basic optimization".
Do I have to attach a volatile declaration to variables whose values are changed externally? (Currently, no volatile declaration is attached.)

Answer:

Attach a volatile declaration.
Even in the case of basic optimization, those variables may possibly be optimized.
In the case you stated in your question, be sure to attach a volatile declaration.
Suitable Products
  • 이 기사가 도움이 되셨나요?