C++ Logo

liaison

Advanced search

Re: [isocpp-wg14/wg21-liaison] P3248R0 Require [u]intptr_t

From: Jₑₙₛ Gustedt <jens.gustedt_at_[hidden]>
Date: Fri, 24 May 2024 08:37:51 +0200
Hi,

on Thu, 23 May 2024 11:17:44 +0100 you (Nina Dinka Ranns via Liaison
<liaison_at_[hidden]>) wrote:

> We have a question from the author of P3248R0
> <https://wg21.link/p3248r0> Require
> [u]intptr_t :
>
> - If C++ requires [u]intptr_t with the proposed semantics (same as
> C), does SG22 have any concerns w.r.t. C++ compatibility with C on
> platforms C++ supports?
>
> Thoughts ?

C also wants to go into that direction but is for the moment more
careful by only placing this in TS 6010 (provenance). I don't think
that it would be reasonable for any platform that has a C++
implementation not to support this also in their C implementation.

So putting this into C++ might actually force the very few platforms
that don't have `uintptr_t`, yet, into implementing it, respectively,
what is much more important, to work out their ABI for doing this. As
the paper correctly states, with C23 this is now possible under all
circumstances. There are only a few platforms that don't have
these types, the only ones we found have 128 bit pointers and 64 bit
`uintmax_t`. I suspect that all of these have C++ implementations.

To summarize, this would be kind-of a bold move from C++ to force
something on basically all C implementations. Whether or not this is
politically advisable I don't know.

Thanks
Jₑₙₛ

-- 
:: ICube :::::::::::::::::::::::::::::: deputy director ::
:: Université de Strasbourg :::::::::::::::::::::: ICPS ::
:: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
:: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
:: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

Received on 2024-05-24 06:37:55