|
![](/i/fill.gif) |
Warp wrote:
> I don't remember for sure, but I think that the standard might say
> something that if you access the data behind a null pointer the program
> will be terminated.
I would be surprised if running off the end of an array is undefined but
accessing the null pointer is defined. It would prevent C++ from being
standards-compliant in lots of places that don't have memory management
hardware. I wouldn't be surprised if the number of such systems actually
outnumbers the number of systems *with* memory protection, once you
start counting cell phones, microwave ovens, televisions, etc.
However, you may very well be right. I'm just guessing from
what-should-be-reasonable. :-)
> At least in practice this is so in all the most common systems.
Most common desktop systems, yes. I suspect this is more a POSIX thing
than a C++ thing, really.
--
Darren New / San Diego, CA, USA (PST)
Post a reply to this message
|
![](/i/fill.gif) |