|Permuting fields of records email@example.com (1993-06-04)|
|C structure padding firstname.lastname@example.org (1993-06-26)|
|Re: C structure padding email@example.com (1993-06-27)|
|Re: C structure padding firstname.lastname@example.org (Tom Lord) (1993-06-27)|
|Re: C structure padding email@example.com (1993-06-27)|
|Re: C structure padding firstname.lastname@example.org (1993-06-28)|
|Re: C structure padding email@example.com (1993-06-28)|
|Re: C structure padding firstname.lastname@example.org (1993-06-29)|
|From:||email@example.com (Mark Brader)|
|Organization:||SoftQuad Inc., Toronto, Canada|
|Date:||Tue, 29 Jun 1993 04:21:57 GMT|
Dale R. Worley (firstname.lastname@example.org) writes:
> This leads up to a point that I've never seen satisfactorily resolved:
> Must a structure be padded when it is *not* part of an array? I've never
> seen anything in the Standard that makes it clear that such a structure
> must be padded, bit it seems clear that padding is necessary for common
> programming paradigms to work. Am I missing something?
> [It's pretty clear that all structures have to be treated the same, since
> if p and q are pointers to structures, you can write *p = *q regardless of
> whether they're pointing to simple structures or into an array. -John]
Right. Chapter and verse: section 220.127.116.11 (ANSI) / 18.104.22.168 (ISO),
Semantics, last paragraph, my emphasis added.
# There may also be unnamed padding at the end of a structure or union,
# as necessary to achieve the appropriate alignment *WERE* the structure
# or union to be an element of an array.
I may as well point out here the existence of comp.std.c, which is
specifically for topics about the C standard. If Dale had posted there,
he or she would no doubt have received half a dozen responses from people
familiar with the above text (followed, of course, by a minor flame war,
under the same Subject line, about some tangential topic or other...).
SoftQuad Inc., Toronto
Return to the
Search the comp.compilers archives again.