当前位置: 动力学知识库 > 问答 > 编程问答 >

c++ - Post-increment within a self-assignment, different results between VS2013 and GCC

问题描述:

This question already has an answer here:

  • Why are these constructs (using ++) undefined behavior?

    10 answers

  • Undefined behavior and sequence points

    4 answers

网友答案:

This is textbook undefined behavior. The compiler can do whatever the hell it wants to. By the language spec, it is allowed to halt and catch fire, should it so choose; be glad they just did something vaguely related to the nonsense you fed them.

分享给朋友:
您可能感兴趣的文章:
随机阅读: