[ub] [c++std-ext-14564] Re: Sized integer types and char bits
Jean-Marc Bourguet
jm at bourguet.org
Sat Oct 19 10:02:14 CEST 2013
On 19/10/2013 05:19, Lawrence Crowl wrote:
> On 10/18/13, John Spicer <jhs at edg.com> wrote:
>> What does requiring CHAR_BIT == 8 buy us? Sorry if I missed that
>> detail in the large volume of messages in this thread.
> Since the introduction of UTF-8 literals, we have required
> CHARBIT >= 8. So, the change would be to cap CHAR_BIT at 8. I remember
> something about a 24-bit system on the gcc mailing lists a couple of
> years ago, but I don't remember what happened with char.
>
C90 alread requires CHAR_BIT >= 8.
If I'm not mistaken, POSIX requires CHAR_BIT to be 8.
Not that I'm for extending this requirement to C++, I think it would
simply add
a gratuitous difference with C and like John I don't see what it would
buy us.
(And if it did buy us something, I'd first check if we could have the
same benefit
by having this requirement only for hosted implementations, leaving the
freestanding
one free to have CHAR_BIT > 8).
Yours,
--
Jean-Marc
More information about the ub
mailing list