Alignment (was: Structure Member Padding)

Mark Brader msb at sq.sq.com
Sun Aug 12 18:04:46 AEST 1990


> > 1.6 says that any object is a contiguous sequence of bytes, each of which
> > is individually addressable.  3.3.3.4 forces the size of type char to be
> > exactly 1 byte.  

> In recent years, for some reason, people have been assuming that "byte"
> means "eight bits" (bit = binary unit of information).

I wasn't.  I didn't quote the Standard's definition of "byte" because
it didn't seem relevant to the alignment issues that I was talking about.
This definition is also in 1.6 and what it amounts to is that a "byte" is
an addressable unit of storage big enough to hold a character (in the
basic execution character set).  Section 2.2.4.2 then requires this to
be at least 8 bits, but it could be more.

-- 
Mark Brader, SoftQuad Inc.,		"For want of a bit the loop was lost..."
Toronto, utzoo!sq!msb, msb at sq.com				 -- Steve Summit

This article is in the public domain.



More information about the Comp.std.c mailing list