- 论坛徽章:
- 0
|
回复 163# 幻の上帝
不过顺便又得吐槽ISO C了,这种细节上的描述习惯性缩水,几乎从来就没比ISO C++清楚过(我所知的反例是trap representation/indeterminate value等少数几个)……(为什么有时候C的语境下我习惯顺带引用ISO C++而绝少反过来,也是这个原因。)
ISO C++11
1.9 Program execution [intro.execution]
12 Accessing an object designated by a volatile glvalue (3.10), modifying an object, calling a library I/O function, or calling a function that does any of those operations are all side effects, which are changes in the state of the execution environment. Evaluation of an expression (or a sub-expression) in general includes both value computations (including determining the identity of an object for glvalue evaluation and fetching a value previously assigned to an object for prvalue evaluation) and initiation of side effects. When a call to a library I/O function returns or an access to a volatile object is evaluated the side effect is considered complete, even though some external actions implied by the call (such as the I/O itself) or by the volatile access may not have completed yet.
|
|