In comp.os.linux.advocacy, Wayne Throop
< XXXX@XXXXX.COM >
on Thu, 06 Jan 2005 20:53:56 GMT
< XXXX@XXXXX.COM >:
They are now. Pointers on 64-bit machines are 64-bit.
At least, one hopes so; there was a -taso option
at one point on the Alphas when building using OSF/1
(which is now named something else).
In times of yore, pointers might have been 4-byte while
ints are 2; then someone got the bright idea of making
the ints bigger as the hardware got more capable,
so pointers and ints became the same size again.
I'm old enough to remember when both were *2* bytes,
on a PDP 11/70 running Unix. Admittedly back then I
wasn't as sophisticated software-wise as I am today.
At some point I'm going to have to exhume a tape (it's
a 1/2" reel tape, too!) and see what my software really
looked like back in college in 1983... :-)
There used to be a Honeywell with *9-bit* characters.
I have worked on HP machinery (but not in C) that used
16-bits per word, word addressing. I think the Basic
interpreter divided by 2 to get the word of a string
byte it wanted, then took the requisite byte depending
on the odd bit out.
That line relating 8086es may have to be modified. At
some point many programs may have had both NEAR pointers
(16-bit offsets to the default Intel paragraph) and
FAR pointers (paragraph and offset). Also, I think there
were a number of memory models: tiny, small, medium, large,
and huge are the ones I remember. (This may have been
tiny: everything's shoved into one segment
small: CS and DS use 16-bit offsets
huge: far pointers everywhere?
Thank Intel the 386 allowed for 32-bit offsets. :-)
But what a pain.
It gets weirder, though. In C++, 0 is null:
void * p = 0;
is perfectly legal and accepted usage, AIUI.
Maybe 1 for 3, but it's an infield dribbler. (Uh,
should I rephrase that?)
It's still legal to go .sigless.