Related articles |
---|
Re: Successful compilers for segment compilers@ima.UUCP (1986-01-07) |
Re: Successful compilers for segment compilers@ima.UUCP (1986-01-10) |
Re: Successful compilers for segment compilers@ima.UUCP (1986-01-13) |
From: | compilers@ima.UUCP |
Newsgroups: | mod.compilers |
Date: | 13 Jan 86 20:38:00 GMT |
Article-I.D.: | ima.136300053 |
Posted: | Mon Jan 13 15:38:00 1986 |
[from ihnp4!ho95e!wcs]
In article <136300045@ima.UUCP> you write:
>[from Davidsen <harvard!rochester!steinmetz!davidsen>]
>In article <136300020@ima.UUCP> compilers@ima.UUCP writes:
>>....
>>You cannot produce a 'good' compiler for a segmented architecture for a
>>language that has unbridled pointers, such as C. C comes with the built-in
>>assumption that addresses are mappable onto the integers.
>
>Not so! X3J11 has carefully stated that there is no guarantee that integers
>can hold any pointer value, or that any pointer value except (void *) and
>(char *) can hold the address of another data type without data loss. In K&R
I think you're misreading the original statement. When the author wrote:
"addresses are mappable onto the integers"
it could been talking about assigning pointers to ints, but was
probably talking about mapping the space of valid addresses onto the
mathematical set {1, 2, 3, 4, ...}, presumably 1:1 with a contiguous
subset of the integers - in other words,
"The memory of the machine looks like one long array, not
a bunch of little pieces"
which is untrue on segmented machines.
--
# Bill Stewart, AT&T Bell Labs 2G-202, Holmdel NJ
1-201-949-0705 ihnp4!ho95c!wcs
[I suspect that a piecewise continuous mapping would be sufficient. In any
case, I'd rather drop this topic unless somebody from X3J11 or dmr has
something definitive to say. -John]
--------
Return to the
comp.compilers page.
Search the
comp.compilers archives again.