未定義動作
#C言語
#C++
何も保証されない動作(何が起きてもいい)
規格が明示的に定義していない動作は未定義動作になりうる
https://timsong-cpp.github.io/cppwp/intro.defs#defns.undefined
起きる例
最後の要素の次の要素を越えた
ポインタ
https://timsong-cpp.github.io/cppwp/basic.compound#3.2
https://timsong-cpp.github.io/cppwp/expr.add#4.2
https://timsong-cpp.github.io/cppwp/expr.add#footnote-59
符号付き整数の
オーバーフロー
https://timsong-cpp.github.io/cppwp/expr.pre#4
https://timsong-cpp.github.io/cppwp/basic.fundamental#note-2
整数の
ゼロ除算
https://timsong-cpp.github.io/cppwp/expr.mul#4
オブジェクトを指していない
ポインタ
の
参照外し
https://timsong-cpp.github.io/cppwp/expr.unary.op#1