C++ Logo

std-proposals

Advanced search

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

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Thu, 31 Jul 2025 21:03:08 +0300
On Thu, 31 Jul 2025 at 21:01, zxuiji via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> 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.

That's not correct at all. There are capability-based memory-safety
approaches that turn off pointer arithmetic for single-object
pointers, and that works
just fine.

Received on 2025-07-31 18:03:22