Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement
来源:互联网 发布:新网域名如何绑定空间 编辑:程序博客网 时间:2024/05/21 17:04
Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement
运算符两边都是volatile变量的警告
这警告有意义.
用volatile修饰的变量一般不直接参与运算,volatile就以为着这个变量在运算过程中有可能已经改变了
改正方式:
例如:想计算a * b 要这样:
volatile unsigned char a;
volatile unsigned char b;
unsigned char x,y;
x = a;
y = b;
return (x * y);
建议使用另外一个变量参与计算:
volatile char VVV = 9;
char fun()
{
char xxx;
char yyy = 9;
xxx = VVV;
return xxx * yyy
}
0 0
- Warning[Pa082]:undefined behavior: the order of volatile accesses is undefined in this statement
- Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement
- Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement
- Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement
- IAR编译 Warning[Pa082]:undefined behavior: the order of volatile accesses is undefined in this stateme
- 【IAR警告】Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined
- [教你警告消除]Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined。
- undefined behavior: the order of volatile accesses is undefined in this statement
- IAR编译警告:the order of volatile accesses is undefined
- 68.Which statement is true regarding the default behavior of the ORDER BY clause?
- undefined behavior in C++
- this.onMetaChange is undefined
- this.ds is undefined
- this.grid is undefined
- warning: deleting 'void *' is undefined
- warning: deleting 'void *' is undefined
- TypeError:this.K is undefined
- Class JavaLaunchHelper is implemented in both. One of the two will be used. Which one is undefined
- 360面试题--时钟问题
- 步步为营(十三)常用数据结构(6)STL-Stack(栈)
- STL中栈和队列的使用方法
- android Studio 常用快捷键大全
- error LNK2001: unresolved external symbol @__security_check_cookie@4
- Warning[Pa082]: undefined behavior: the order of volatile accesses is undefined in this statement
- MySQL存储过程相互调用
- POST数据加密
- 经典算法之:贪心算法
- Ubuntu启用root
- java中byte(byte []), int的转换
- OBIEE分析开发-归档注意点
- 股票证券开户
- poj 2585 Window Pains(拓扑排序)(经典)(困难)