Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Zero Length Arrays Allowed in C Standard?DOWN Message-ID: <21183@mimsy.umd.edu> Date: 8 Dec 89 17:53:59 GMT References: <480@codonics.COM> <2678@cbnewsj.ATT.COM> <70691@psuecl.bitnet> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 20 In article <70691@psuecl.bitnet> c9h@psuecl.bitnet writes: >Am I overlooking something, or is storage order actually undefined? Storage allocation order in general is left to the implementation, but some things are specified. In particular, structure members must be allocated in order, possibly leaving gaps. That is, a compiler cannot take something like struct foo { int a; char b; double c; char d; }; and `rearrange' it to the order c/a/b/d, even if that would cause the structure to fit in nearly half as much space. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris