C++ Logo


Advanced search

Restrict possible values of CHAR_BIT

From: Lyberta <lyberta_at_[hidden]>
Date: Thu, 24 Oct 2019 17:30:00 +0000
I propose to restrict possible values of CHAR_BIT to be 8 * (2 ^ n)
where n is a non-negative integer.

This gives values of 8, 16, 32, 64, 128 and so on.

I have surveyed the most likely hardware architectures that would not
fit with this restriction - computers with 24 bit bytes i.e. where
CHAR_BIT == 24.

The most extensive information I could find is on Wikipedia:


It seems like the only candidate that is still relevant is Motorola
56000 series:


However, the specification says that it uses 8 bit bytes:


Therefore, I couldn't find implementations where CHAR_BIT == 24 which
means other more exotic cases probably never existed.

Received on 2019-10-24 12:32:31