bytes don't fill words

msb at sq.UUCP msb at sq.UUCP
Tue Jan 27 04:29:11 AEST 1987


Ray Butterworth says:
> If it doesn't do so already, the ANSI C standard should explicitly
> state the following:
> 
> 1) BITS_PER_WORD%BITS_PER_BYTE need not necessarily be 0.

On the contrary, and contrary (it seems to me) to Doug Gwyn's earlier
posting (regarding byte-by-byte copying of objects), the Draft states
at section 1.5, page 2, lines 38-39 that:

# Except for bit-fields, objects are composed of contiguous sequences
# of one or more bytes ...

I claim that this is indeed desirable behavior, because it allows
functions such as memcpy() to work predictably.  Certainly it clashes
with architectures like the DECsystem-10's 7-bit chars in a 36-bit word,
but them's the breaks; I suspect that there are no C's now on such machines.

This is rather similar to an article I posted just before USENIX;
I am posting again in case the other one expired before Doug and other
interested parties got back from there.

Mark Brader



More information about the Comp.lang.c mailing list