- C++相談室 part116 [転載禁止]©2ch.net
367 :デフォルトの名無しさん[sage]:2015/03/30(月) 00:49:23.13 ID:+8902R/b - >>364
この意味がわからないのか? http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1438 The current Standard says that any use of an invalid pointer value produces undefined behavior (3.7.4.2 [basic.stc.dynamic.deallocation] paragraph 4). This includes not only dereferencing the pointer but even just fetching its value. The reason for this draconian restriction is that some architectures in the past used dedicated address registers for pointer loads and stores and they could fault if, for example, a segment number in a pointer was not currently mapped.
|