Related articles |
---|
[6 earlier articles] |
Re: Integers on 64-bit machines mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2007-07-05) |
Re: Integers on 64-bit machines gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-07-05) |
Re: Integers on 64-bit machines bobduff@shell01.TheWorld.com (Robert A Duff) (2007-07-05) |
Re: Integers on 64-bit machines marcov@stack.nl (Marco van de Voort) (2007-07-06) |
Re: Integers on 64-bit machines DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-07-06) |
Re: Integers on 64-bit machines DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-07-06) |
Re: Integers on 64-bit machines DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-07-06) |
Re: Integers on 64-bit machines anton@mips.complang.tuwien.ac.at (2007-07-06) |
Re: Integers on 64-bit machines marcov@stack.nl (Marco van de Voort) (2007-07-08) |
Re: Integers on 64-bit machines cfc@shell01.TheWorld.com (Chris F Clark) (2007-07-08) |
Re: Integers on 64-bit machines DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-07-09) |
Re: Integers on 64-bit machines torbenm@app-6.diku.dk (2007-07-09) |
Re: Integers on 64-bit machines gneuner2@comcast.net (George Neuner) (2007-07-09) |
[9 later articles] |
From: | Hans-Peter Diettrich <DrDiettrich1@aol.com> |
Newsgroups: | comp.compilers |
Date: | Fri, 06 Jul 2007 10:08:33 +0200 |
Organization: | Compilers Central |
References: | 07-07-007 07-07-021 07-07-025 |
Keywords: | architecture, arithmetic, design |
Posted-Date: | 08 Jul 2007 18:59:54 EDT |
Marco van de Voort wrote:
> [Jeez, I thought we got away from the abomination of pointers that are
> longer than ints when we left the 286 large mode. No such luck, huh? -John]
Why do you see a need for *any* relationship between addresses and values?
For an compiler writer, addresses are just another data type, whose size
varies with the architecture of the target machine.
For an debugger writer, addresses are offsets into the address space of
an process.
For an application writer, addresses should not have any specific
meaning. Can you give a practical example, where addresses (i.e. the
values of pointers) have to be handled as numerical data types?
Hint: Even in C, a pointer difference is expressed in *elements*, not in
bytes. The same for pointer increments...
The NULL pointer also doesn't have an natural value, it's zero only by
convention. Floating point numbers have more such special "values", like
NaN, but all these have a useful meaning only within their own data
type, not as integer values.
And for an machine code hacker, the word and register sizes are fixed by
the architecture, no room for discussions ;-)
DoDi
Return to the
comp.compilers page.
Search the
comp.compilers archives again.