C++ Logo

std-proposals

Advanced search

[std-proposals] uintfptr_t

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Mon, 17 Aug 2026 14:11:46 +0100
Normally this mailing list is for proposals, and people get a P number
for their document.

On this occasion though, rather than putting forward a proposal, I am
making a demand, and my document shall therefore get a D number.

There has been a gaping hole in the Standard for decades now. We have
uintptr_t for storing a data pointer as an integer, but we don't have
uintfptr_t to store a code pointer as an integer.

For decades, people have been using uintptr_t in scenarios where they
really needed uintfptr_t. This is an obscenity which needs to be
corrected, especially given the advent of the new "-m32df" ABI for the
GNU compiler.

The new "-m32df" ABI has 32-Bit data pointers and 64-Bit code
pointers. Code pointers are twice as wide because the higher 32 bits
correspond to a custom stack, as can be seen here:

    https://godbolt.org/z/85er78x5Y

Therefore I demand the addition of uintfptr_t to the language.

Furthermore I have a proposal. I propose the following new type:

    uintp_t

uintp_t will be used to store either a code pointer or a data pointer
(i.e. it is the wider of uintptr_t and uintfptr_t).

Also I propose their signed equivalents: intfptr_t, intp_t

Received on 2026-08-17 13:12:03