Bartc wrote:
"pete" <pfiland@mindsp ring.comwrote in message
news:RpSdnQ0Ysa NN74nVnZ2dnUVZ_ v-hnZ2d@earthlink .com...
>
I was thinking in terms of verifying pointer values passed to functions.
>
(4) of my list is easy. (3) and (2) are progressively more difficult. (1)
might be impossible (for the function to determine anyway).
>
3 on your list is again easy. But I wouldn't know how to test the others,
and if I did, the object in question might be the wrong one.
news:RpSdnQ0Ysa NN74nVnZ2dnUVZ_ v-hnZ2d@earthlink .com...
>Bartc wrote:
>>
>I consider object pointer values into a different four groups:
>1 address of an object
>2 one past the address of an object
>3 null pointer
>4 indeterminate
>>
>>Pointer values can be roughly grouped into these kinds:
>>>
>>(1) Pointing at the right thing
>>(2) Pointing at the wrong thing
>>(3) Containing an illegal address other than NULL
>>(4) Containing NULL
>>>
>>(1) Pointing at the right thing
>>(2) Pointing at the wrong thing
>>(3) Containing an illegal address other than NULL
>>(4) Containing NULL
>1 address of an object
>2 one past the address of an object
>3 null pointer
>4 indeterminate
I was thinking in terms of verifying pointer values passed to functions.
>
(4) of my list is easy. (3) and (2) are progressively more difficult. (1)
might be impossible (for the function to determine anyway).
>
3 on your list is again easy. But I wouldn't know how to test the others,
and if I did, the object in question might be the wrong one.
to examine an indeterminate pointer value.
If an indeterminate pointer value is an argument to a function call,
then you're on your own.
The rules of C no longer apply to what your program will do.
--
pete
Leave a comment: