[Issue 24412] No predefined version for 64bit ?!
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 27 02:03:13 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24412
--- Comment #12 from Manu <turkeyman at gmail.com> ---
This issue is strictly about the arch, and pointer width/ABI matters is
explicitly NOT what this request is about.
The thing Iain shows:
```
import gcc.builtins : ___builtin_machine_int;
static if (__builtin_machine_int.sizeof == 8):
```
This is what should be expressed by a standard version token present for all
compilers/architectures.
On the tangent regarding X32; it is deprecated for linux, but cross compilers
will need to express this concept for all time.
For my money, D_X32 should continue to exist, and the spec adjusted to require
this constant for all targets where 32bit pointers are used on a 64bit arch,
which would include the X32 ABI for X86, but also similar ABI's for other
architectures too.
It's not strictly necessary, because we can test size_t.sizeof, but since it's
already there and removing it would be a breaking change, the spec could be
slightly adjusted to make it generally useful.
--
More information about the Digitalmars-d-bugs
mailing list