On Sun, 14 Oct 2007 12:44:02 +0000 (UTC), $)CHarald van D)&k
<truedfx@gmail.com> wrote:
>On Sat, 13 Oct 2007 18:48:38 -0700, Barry Schwarz wrote:
>> On Thu, 11 Oct 2007 19:39:30 +0000 (UTC), roberson@ibd.nrc-cnrc.gc.ca
>> (Walter Roberson) wrote:
>>
>>>In article <1192130548.100801.171110@o3g2000hsb.googlegroups. com>,
>>> <c.a.l@seznam.cz> wrote:
>>>>a) If i do
>>>>pointer = pointer_to_safe_thing - 1000; pointer[1000] ==
>>>>pointer_to_safe_thing[0];
>>>
>>>>then
>>>>I am *not* accessing invalid memory. Nor i am incorrect in mathematical
>>>>sense.
>>>>Nevertheless outcome of pointer_to_safe_memory - 1000 operation
>>>>yielding pointer may be undefined. For i do not know whether pointers
>>>>wraparound like integers?
>>>
>>>Implementation dependant. You can only *safely* have a pointer that is
>>>NULL, or points into an object, or points "one past" the end of the
>>>object.
>>
>> Nope. It is undefined behavior
>
>Undefined behaviour is inherently implementation dependent.
>
Implementation dependent implies that the behavior will be consistent
on a particular implementation (the same today as it was yesterday).
Undefined behavior is not so constrained.
Remove del for email