表达式副作用¶
volatile¶
int volatile 的含义¶
- 代码没有改
a, 但是发现a变成20了? 是谁改的呢?
MMIO¶
Memory-Mapped Input / Output (MMIO) : 给 I/O 设备流出内存空间
MYNUM是左值, 对象类型是int volatile, 就意味着这段内存会被我们未知的方式修改 (可能是传感器去改的)
volatile 对象的 evaluate¶
如果要 evaluate, 都必须去访问对应的内存
也好理解, 因为在寄存器的值和内存可能不一样了
Evaluation of Expression¶
- Value computation 求值, 返回
<V, V_T> - Initiation of side effect 副作用
a=b和b的求值是否有先后顺序?- 有, An assignment expression has the value of the left operand after the assignment
a的值什么时候改的?- The side effect of updating the stored value of the left operand is sequenced after the value computations of the left and right operands.
- 在这里当
b求完值就可以改了
Sequenced Before¶
函数¶
函数七元组:
- value 是函数的地址
- value type 是函数类型的指针类型
- 函数没有对齐要求
Function Designator
- Function identifier (函数标识符)
- 如果一个表达式 exp, 其 rvalue 类型是函数指针类型, 则
*exp是一个合法的 Function Designator

