Article View: comp.std.c
Article #103Re: Character arrays in structures and address alignment -- any standard?
From: Mark Brader
Date: Sun, 09 Aug 1992 23:09
Date: Sun, 09 Aug 1992 23:09
17 lines
1312 bytes
1312 bytes
> > "There may be [therefore] unnamed padding within a structure object, but > > not at its beginning, as necessary to achieve the appropriate alignment." > > This wording was chosen very carefully -- in particular, the use of > "appropriate" as opposed to "necessary". It is the implementor who > decides what alignment is "appropriate", so anything goes. This is a curious remark, considering that the quoted passage *does* include the word "necessary". Until and unless there is an Interpret- ation Ruling to the contrary, I'll continue to opine that "necessary" implies no padding between adjacent members of identical type. -- Mark Brader "It is impractical for the standard to attempt to SoftQuad Inc., Toronto constrain the behavior of code that does not obey utzoo!sq!msb, msb@sq.com the constraints of the standard." -- Doug Gwyn This article is in the public domain.
Technical Details
Message-ID:
<1992Aug9.230910.16565@sq.sq.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!wildcan!sq!msbReferences:
<7022@skye.ed.ac.uk> <14382@ksr.com> <1947@sdrc.COM>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!wildcan!sq!msb From: msb@sq.sq.com (Mark Brader) Subject: Re: Character arrays in structures and address alignment -- any standard? Message-ID: <1992Aug9.230910.16565@sq.sq.com> Organization: SoftQuad Inc., Toronto, Canada References: <7022@skye.ed.ac.uk> <14382@ksr.com> <1947@sdrc.COM> Date: Sun, 9 Aug 92 23:09:10 GMT Lines: 17