4 ms·
I don't have any special knowledge, but I would speculate that it's for approximately the same reasons C allows you to define a byte as 7 bits: Backwards compat
by gaganyaan 4y ago
I don't have any special knowledge, but I would speculate that it's for approximately the same reasons C allows you to define a byte as 7 bits: Backwards compatibility that let everyone agree on a standard
- mananaysiempre 4y agoAs 7, no (CHAR_BIT is required to be at least 8, see 5.2.4.2.1p1), but as 9, yes. Ancient machines aside, there are apparently DSPs with 16- or 32-bit machine bytes (addressable units), and people would prefer not to kludge 8-bit C bytes on top of that even if they could by fattening the pointers a bit. Of course, the question of how the hell you are going to reconcile pervasive 8-bit storage and the C standard’s requirement that fputc|fgetc roundtrip every possible byte is still open—see the current committee chair’s grump about that[1]. [1] https://thephd.dev/conformance-should-mean-something-fputc-and-freestanding https://thephd.dev/conformance-should-mean-something-fputc-a...