C++ What is the earliest undefined behavior can manifest itself?

前端 未结 5 1351
臣服心动
臣服心动 2021-01-17 19:48

I\'m aware that undefined behavior can potentially cause anything, which makes any program containing UB potentially meaningless. I was wondering if there is any way to iden

5条回答
  •  悲哀的现实
    2021-01-17 20:07

    while it is "undefined behaviour", given a particular compiler, it will have a predictable behavior of some sort. But because it is undefined, on different compilers, it may result in that behavior occurring at any point of the complilation / runtime

提交回复
热议问题