I don't have enough data to backup your input.

Yet, this thread is worth standardizing.
And it tackles the same issue concerning the bits length used for virtual address space. (48bits instead of other value, would nice to standardize this value too)



Sent from my Galaxy


-------- Original message --------
From: Bo Persson via Std-Proposals <std-proposals@lists.isocpp.org>
Date: 1/28/25 4:44 PM (GMT+01:00)
To: std-proposals@lists.isocpp.org
Cc: Bo Persson <bo@bo-persson.se>
Subject: Re: [std-proposals] Make all data pointers intercompatible

On 2025-01-28 at 15:08, organicoman via Std-Proposals wrote:
>  >Here's what I want:
>
>  >Point 1) void* and char* are exactly the >same.
>
>   At hardware level they are already the same, a different pointer size
> is just a compiler concept, backed up by some bookkeeping.
> void* has always the size of the CPU register, for efficiency,
> configuring it to a smaller size is a compiler concept, that is, instead
> of using the natural architecture instruction, the compiler issues a
> smaller register instruction.
> Expl: instead of
> mov rax, [valueOf ptr] => mov eax, [valueOf ptr]
>           ^^^ in 64bit Arch use a     ^^^ 32bit void*
>

Are we assuming x86 and Linux/Windows only?

We have seen architectures with separate address registers, not of the
same size as integer and floating-point registers.


--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals