C++ Logo


Advanced search

Subject: Re: [ub] [c++std-ext-14564] Re: Sized integer types and char bits
From: Jean-Marc Bourguet (jm_at_[hidden])
Date: 2013-10-19 03:02:14

On 19/10/2013 05:19, Lawrence Crowl wrote:
> On 10/18/13, John Spicer <jhs_at_[hidden]> 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
one free to have CHAR_BIT > 8).



SG12 list run by herb.sutter at gmail.com