C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Standardising 0xdeadbeef for pointers

From: zxuiji <gb2985_at_[hidden]>
Date: Thu, 31 Jul 2025 19:15:24 +0100
You can't just redfine the meaning of a pointer, asm defined it years ago
and C etc just have to follow on, and asm defined it to have arithmetic so
arithmetic it shall, *always*. If a vendor decides to make the add
instruction throw an exception then the CPU is already dead in the water
because no gamer will want it, no business will need it for their server
more than one that allows it, there is literally no value to disabling
pointer arithmetic and only cons.

On Thu, 31 Jul 2025 at 18:40, Andrey Semashev via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On 31 Jul 2025 20:29, zxuiji via Std-Proposals wrote:
> > nullptr MUST hold a value, not matter if that value is valid or not,
> > therefore it will ALWAYS have pointer arithmetic available. It is utter
> > insanity to say a pointer might not have pointer arithmetic.
>
> nullptr might be a trap value, so applying any sort of math to it (or
> dereference it) would cause a hardware fault.
>
> PS: Cheetos crust, I can't believe this thread is still going..
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2025-07-31 18:01:21