| 最近使用 IAR 的时候遇到一个 warning 很奇怪,一个操作变量的函数老是报警告: Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement E:\....
 
 void PID_Init(PID_TypeDef *pTemp,
 int32_t      Kp,
 int32_t      Ki,
 int32_t      Kd,
 int32_t      ErrorMax,
 int32_t      ErrorMin,
 int32_t      OutputMax,
 int32_t      OutputMin
 )
 {
 
 
 }
 
 
 这样就会报刚刚的 warning, PID_TypeDef 也只是一些变量而已,全都没有volatile修饰;
 不知道各位大侠有没有遇到过这种warning。
 
 谢谢!
 
 
 |