references to dereferenced null pointers

Ronald Guilmette rfg at ics.uci.edu
Sun Mar 18 19:18:30 AEST 1990


In article <10582 at alice.UUCP> shopiro at alice.UUCP (Jonathan Shopiro) writes:
>
>
>To me the interesting question in this null pointer business is
>whether there is any circumstance where it is legal to say *p
>where p is a null pointer.
...
>I think the fundamental issue here is when is a pointer dereferenced?
>(Since it is clearly illegal to dereference the null pointer).  I don't
>se why writing
...
>
>	&*p
>
>should dereference p.

I think this discussion is comming full circle.

If you scan backwards over the (20-30) postings on this issue you'll note that
I said almost exactly this same thing 20-30 messages ago.

It was quickly pointed out to me that I was I was being naive (which I now
freely admit that I was) because the question becomes confusing if p
contains a NULL pointer value.

Perhaps we should just take a vote and put the issue to bed.


// Ron Guilmette (rfg at ics.uci.edu)
// C++ Entomologist
// Motto:  If it sticks, force it.  If it breaks, it needed replacing anyway.



More information about the Comp.std.c mailing list