Subject: Re: 64bit issues
To: None <port-alpha@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: port-alpha
Date: 12/19/1999 10:05:43
In message <Pine.LNX.3.96.991219024645.1758A-100000@guild.net>, Lord Isildur wr
ites:
>linearly addressable storage is one of the fundamental tenets of C.
No, it really isn't. Just think about segmented memory schemes.
>This is made very clear by the very creators of the language, and any
>attampt to implement C where this is not available ends up jumping through
>a lot of hoops to effectively simulate this. C's conspicuous lack of
>restrictive high-level specifics is precisely the reson is _can_ be ported
>even to such strange machines. In C, it's all memory.
The complete lack of specification also says that you can use any *other*
scheme you want.
Nothing promises that pointers within different objects can be meaningfully
compared for "greater than" or "less than", for instance. The language
specifically *forbids* any attempt to make sense of such comparisons.
C originated on flat memory machines; however, it wasn't designed to require
or assume them. It has some quirks that probably originated as assumptions
about those machines, but it's evolved since then.
In a couple weeks here, you'll be able to get the C9X spec and see for
yourself where the language is these days. ;-)
(Distressingly, I'm told it's now the official standard, even though there are
probably no more than 50 people in the world who have copies. Ugh.)
-s