Memory Model in C++ : sequential consistency and atomicity

前端 未结 3 1206
刺人心
刺人心 2020-12-31 23:41

I have some questions connected with memory model in C++11.

On https://www.think-cell.com/en/career/talks/pdf/think-cell_talk_memorymodel.pdf on the 29. slide is wri

3条回答
  •  醉酒成梦
    2021-01-01 00:37

    The only possible way to define semantics for a language with undefined behavior is by describing sequential execution. Ergo, all programs behave as with sequential execution, or no program has defined behavior.

    The idea that you have both in C/C++ is a hoax. Programs must behave sequentially for the semantics to make sense.

提交回复
热议问题