【ISO/ANSI/JIS】 C言語なら俺に聞け! Part 132 at TECH
[2ch|▼Menu]
398:デフォルトの名無しさん
07/10/26 17:12:01
>>397
§6.7.3.6
An object that has volatile-qualified type may be modified in ways unknown to the
implementation or have other unknown side effects. Therefore any expression referring
to such an object shall be evaluated strictly according to the rules of the abstract machine,
as described in 5.1.2.3. Furthermore, at every sequence point the value last stored in the
object shall agree with that prescribed by the abstract machine, except as modified by
theunknown factors mentioned previously.114) What constitutes an access to an object that
has volatile-qualified type is implementation-defined.

確かに実装依存と書いてあるね。しかしアトミックである事を保証できないのならvolatile修飾子の意味は
無い事になってしまう。規格には保証されてなくても実際volatileをそのような目的に使うなら、CPU固有の
振る舞いを知っておく事は非常に重要なはずだ。


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5378日前に更新/146 KB
担当:undef