[cfe-dev] On sizeof char, bytes, and bits in the C99 standard
Howard Hinnant
hhinnant at apple.com
Sat Jan 3 08:46:49 PST 2009
On Jan 2, 2009, at 2:27 PM, Chris Lattner wrote:
> On Jan 2, 2009, at 8:47 AM, Török Edwin wrote:
>> Ok, so I may assume that on any POSIX compliant platform CHAR_BITS
>> is 8?
>> (POSIX requires (u)int8_t:
>> http://www.opengroup.org/onlinepubs/000095399/basedefs/stdint.h.html)
>
> I think that it is safe to say that Clang should only care about 8-bit
> bytes until someone comes along with a machine that has a non-8-bit
> byte and is willing to do the work to enhance it...
This seems like a reasonable strategy, but I wanted to add: 24 bit
byte processors are not rare in the DSP (audio/vidio processing)
arena. Typically everything (char, short, int, long) is 1 byte / 24
bits on such a platform.
-Howard
More information about the cfe-dev
mailing list