Author: petepete Date: Feb 6, 2008 04:37
Keith Thompson wrote:
>
> Peter Nilsson acay.com.au> writes:
>>> Peter Nilsson acay.com.au> wrote:
>>>> ...
>>>> Â int *p = my_array;
>>>> Â int const *const pend = my_array + sizeof my_array/
>>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â sizeof*my_array;
>>>> Â do *p++ = 42;
>>>> Â while (pend != p);
>>>
>>>> At no stage is pend dereferenced; and the loop exits on
>>>> p == pend, so the address is not dereferenced by p
>>>> either.
>>>
>>> Ah, I was a bit confused I guess.
>>> However, OP _does_ dereference it. Not in that snipped,
>>> but in 4)
>>> ...
|