On: raising the semantic level of a program

Peter Corlett abuse at cabal.org.uk
Sun Jun 28 18:20:22 CDT 2020


On Sun, Jun 28, 2020 at 01:32:02PM -0700, Chuck Guzis via cctalk wrote:
[...]
> Why is byte-granularity in addressing a necessity?

Because C's strings are broken by design and require one to be able to form a
pointer to individual characters.

> It's only an issue if you have instructions that operate directly on byte
> quantities in memory.

One wheeze is to just declare that bytes are the same size as a machine word. C
doesn't require char to be exactly 8 bits, but merely at least 8 bits. However,
a lot of C code will break if char, short, int and long aren't exactly the same
size as they are on x86. Mind you, a lot of it is still broken even if they
are...



More information about the cctech mailing list