Bit Addressable Architectures
Larry McVoy
lm at arizona.edu
Thu Mar 17 04:46:11 AEST 1988
In article <1988Mar14.193330.488 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>> Backwards compatibility? With a C compiler insulating the user, the
>> only change is that sizeof(char) is now 8...
>
>Actually, even that incompatibility isn't necessary. A C compiler is
>perfectly free to decide that it still counts in bytes.
>............. given that the hypothetical machine we are discussing does
Hypothetical, my foot. The ETA-10 compiler does exactly what you described.
Crazy thing also converts pointers into bit addresses (p<<3) when you
put them into an int. So think about what code this generates:
foo()
{
register char* bar = (char*)malloc(123);
}
And then get out lint.
>out in the low-order digit. Since octal is the way God meant programmers
>to count (the thumbs are parity bits) :-), this is clearly a Good Thing.
>--
>Those who do not understand Unix are | Henry Spencer @ U of Toronto Zoology
>condemned to reinvent it, poorly. | {allegra,ihnp4,decvax,utai}!utzoo!henry
Jeez, Henry, I finally found something to date you by :-) Doncha know
that hex is the wave to future? (Actually, hex is really nice when you
do network debugging: it's easy to see when the byte order is ``wrong''.)
--
Larry McVoy lm at arizona.edu or ...!{uwvax,sun}!arizona.edu!lm
More information about the Comp.lang.c
mailing list