Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!decwrl!shelby!unix!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter From: walter@hpclwjm.HP.COM (Walter Murray) Newsgroups: comp.lang.c Subject: Re: Indefinite-length array as member of struct: how? Message-ID: <660043@hpclwjm.HP.COM> Date: 11 Jul 89 17:17:35 GMT References: <7360@c3pe.UUCP> Organization: Hewlett-Packard Calif. Language Lab Lines: 20 William Davidsen writes: [Quotes from dpANS about structure members being allocated "sequentialy"] > Although I can't imagine anyone implementing this incorrectly, > neighther section says anything about "increasing" sequence, just that > the allocation is sequential. But the dpANS does provide such a guarantee, in 3.5.2.1: "Within a structure object, the non-bit-field members and the units in which bit-fields reside have addresses that increase in the order in which they are declared." Also, 3.3.8 requires that a relational test involving pointers to members of the same structure will work in the expected way, with the pointer to the member declared later testing higher. Walter Murray -------------