Date: Tue, 2 Sep 2025 15:09:34 -0400
On Tue, Sep 2, 2025 at 2:51 PM Paul Caprioli via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> 1. I would like to see _BitInt(1) allowed in both C and C++.
> The question is what to do in C++ if C does not change to allow it.
> I'm not sure; probably for your proposal, I would follow the C rules.
> Unless you think adding it to C++ would help to persuade C to allow
> it....
>
If C allows it, then I think C++ definitely should. But if C does not allow
it, then I don't see that as being an argument as to why C++ should not.
Since C and C++ both mandate two's complement representation, if either
language were to allow _BitInt(1), it would be capable of holding either 0
or -1. There is no risk of WG21 doing something here that will be
incompatible with something that WG14 decides to do later.
> 2. I agree with your reasoning.
>
> Regards,
> Paul
>
> -----Original message-----
> From: Jan Schultke via Std-Proposals <std-proposals_at_[hidden]>
> Sent: Monday, September 1 2025, 11:03 am
> To: C++ Proposals <std-proposals_at_[hidden]>
> Cc: Jan Schultke <janschultke_at_[hidden]>
> Subject: [std-proposals] D3666R0 Bit-precise integers
>
> Hey,
>
> As some of you may already know, I am working on bringing bit-precise
> integers (_BitInt) to C++. See a very early draft of the paper here:
>
> https://isocpp.org/files/papers/D3666r0.html
>
> The debate over whether _BitInt should be a fundamental type or
> library type has been largely settled, however there are two other
> contentious points:
>
> 1. C does not allow _BitInt(1); should C++ to make generic programming
> more comfortable?
> 2. Should the _BitInt keyword exist in C++? I currently propose to
> have it, mainly because it inevitably will exist as a compiler
> extension or compatibility macro, and it seems pointlessly
> user-hostile not to just standardize existing practice.
>
> If you have some early feedback, especially feedback on these two
> points, that would be appreciated.
>
> You should expect the finished paper to be in the September mailing.
>
> Jan
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
std-proposals_at_[hidden]> wrote:
> 1. I would like to see _BitInt(1) allowed in both C and C++.
> The question is what to do in C++ if C does not change to allow it.
> I'm not sure; probably for your proposal, I would follow the C rules.
> Unless you think adding it to C++ would help to persuade C to allow
> it....
>
If C allows it, then I think C++ definitely should. But if C does not allow
it, then I don't see that as being an argument as to why C++ should not.
Since C and C++ both mandate two's complement representation, if either
language were to allow _BitInt(1), it would be capable of holding either 0
or -1. There is no risk of WG21 doing something here that will be
incompatible with something that WG14 decides to do later.
> 2. I agree with your reasoning.
>
> Regards,
> Paul
>
> -----Original message-----
> From: Jan Schultke via Std-Proposals <std-proposals_at_[hidden]>
> Sent: Monday, September 1 2025, 11:03 am
> To: C++ Proposals <std-proposals_at_[hidden]>
> Cc: Jan Schultke <janschultke_at_[hidden]>
> Subject: [std-proposals] D3666R0 Bit-precise integers
>
> Hey,
>
> As some of you may already know, I am working on bringing bit-precise
> integers (_BitInt) to C++. See a very early draft of the paper here:
>
> https://isocpp.org/files/papers/D3666r0.html
>
> The debate over whether _BitInt should be a fundamental type or
> library type has been largely settled, however there are two other
> contentious points:
>
> 1. C does not allow _BitInt(1); should C++ to make generic programming
> more comfortable?
> 2. Should the _BitInt keyword exist in C++? I currently propose to
> have it, mainly because it inevitably will exist as a compiler
> extension or compatibility macro, and it seems pointlessly
> user-hostile not to just standardize existing practice.
>
> If you have some early feedback, especially feedback on these two
> points, that would be appreciated.
>
> You should expect the finished paper to be in the September mailing.
>
> Jan
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
-- *Brian Bi*
Received on 2025-09-02 19:09:50