Thread overview
Phobos not 64bit aware
Feb 02, 2005
Benjamin Herr
Feb 03, 2005
Thomas Kuehne
February 02, 2005
Hello, D.

I am rather certain that Walter is aware that phobos is not currently portable to 64bit architectures. (For example, internal/gc/gc.d does often assume that uint.sizeof == void*.sizeof == ulong.sizeof/2 == 32 bit, which is not true on some architectures that I would like to see D be usable on.)

I assume this issue is not a priority and likely will not receive any attention before the 1.0 release is out, but I would like to ask how deeply such assumptions are embedded in dmd and the low-level parts of phobos, and perhaps to get an estimate when they will be adressed.


Thanks,
  -ben
February 03, 2005
I may be wrong, but I remember the spec being fairly clear that a uint is a uint is a uint - on 64 bit architectures... it's the same size as on 32 bit ones.

Please see:
http://www.digitalmars.com/d/type.html

Forgive me if I'm mistaken.

-[Unknown]

> I am rather certain that Walter is aware that phobos is not currently portable to 64bit architectures. (For example, internal/gc/gc.d does often assume that uint.sizeof == void*.sizeof == ulong.sizeof/2 == 32 bit, which is not true on some architectures that I would like to see D be usable on.)
February 03, 2005
|> I am rather certain that Walter is aware that phobos is not currently
|> portable to 64bit architectures. (For example, internal/gc/gc.d does
|> often assume that uint.sizeof == void*.sizeof == ulong.sizeof/2 == 32
|> bit, which is not true on some architectures that I would like to see
|> D be usable on.)

| I may be wrong, but I remember the spec being fairly clear that a uint
| is a uint is a uint - on 64 bit architectures... it's the same size as
| on 32 bit ones.

The trouble is: void*.sizeof == uint.sizeof
And I am sure that uint is quite often used instead of the correct size_t.

Thomas
February 03, 2005
My mistake.  I saw uint and ulong but I fear I read it a bit too quickly.

-[Unknown]


> The trouble is: void*.sizeof == uint.sizeof
> And I am sure that uint is quite often used instead of the correct size_t.
> 
> Thomas