|
 |
Warp wrote:
> OTOH, how many modern architectures have null pointers which are not
> all-zeros?
Now, me, being cynical, would say it's more "how many broken programs caused
enough trouble that future architectures made sure that 0 is the bit pattern
for null pointers?" :-) I was using a AT&T 3B2 in the early 90's that had
non-zero null pointers, but I think that's the only machine I ever used that
supported C that didn't use 0. Given they were insurance company computers,
I wouldn't be surprised if they're still around. Legacy business systems
have a way of living on for much longer than you'd think.
> you are just writing C for the PC, Mac and a few Unix computers out there,
> the rules can often be relaxed a bit.
Sure. It's language lawyering, not practical development. That's why I
called it that. :-)
On the other hand, I wonder if segmented pointers (as in near and far
pointers) used a segment of 0 to mean null for far pointers, or guaranteed
that CS:0 and DS:0 (or whtever) would map to invalid pages. Hmmm...
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
 |