C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Make all data pointers intercompatible

From: Jeremy Rifkin <rifkin.jer_at_[hidden]>
Date: Sun, 26 Jan 2025 17:16:55 -0600
> For example on a system where CHAR_BIT==8 but the smallest addressable
unit of memory is 16 bits

That's not possible https://eel.is/c++draft/basic.memobj#intro.memory-1

On Sun, Jan 26, 2025 at 4:07 PM Frederick Virchanza Gotham via
Std-Proposals <std-proposals_at_[hidden]> wrote:

> On Sun, Jan 26, 2025 at 9:45 PM Sebastian Wittmeier wrote:
> >
> > You say:
> >
> > > but yet it can create a Frog* or a Monkey*
> >
> > Are you talking about p and p2?
>
>
> Yes.
>
>
> > Then it is about the pointers itself, not the objects they point to.
>
>
> Yes I'm talking about pointers.
>
>
> > Or are you mostly referring to how many bits pointers need and how they
> are stored?
> > What difference would it make and when?
>
>
> Yes I'm talking about how many bits is needed for the pointer. For
> example on a system where CHAR_BIT==8 but the smallest addressable
> unit of memory is 16 bits. On such a system, a "char*" would need to
> have more bits than an "int*". (I talk about this in the original
> post: https://lists.isocpp.org/std-proposals/2024/05/9773.php )
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2025-01-26 23:17:08