From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_40,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f6aa,76b1fcc14e8dced X-Google-Attributes: gid10f6aa,public X-Google-Thread: 1014db,8b6c45fbebd7d3b7 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,c9c309a1859318a1 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,76b1fcc14e8dced X-Google-Attributes: gid109fba,public X-Google-Thread: 114917,76b1fcc14e8dced X-Google-Attributes: gid114917,public From: Christian Froeschlin Subject: Re: HELP ! need to insert value in array !! Date: 1997/07/02 Message-ID: <33BA7918.41C6@cip.mathematik.uni-stuttgart.de>#1/1 X-Deja-AN: 254084476 References: <33A9C27C.22F7@post4.tele.dk> <5oci49$97g@crl.crl.com> <866920621snz@genesis.demon.co.uk> <5p0v7l$9uc@nntp.seflin.org> <33b64c2f.43589878@nntp.ix.netcom.com> Organization: Comp.Center (RUS), U of Stuttgart, FRG Newsgroups: comp.lang.c,comp.lang.c++,comp.os.msdos.programmer,comp.lang.asm.x86,comp.lang.ada Date: 1997-07-02T00:00:00+00:00 List-Id: Robert Dewar wrote: > > suppose that type T is a struct with a double field and an int > field. The size of this struct would be 12 bytes, but its > alignment requirement is 8, so it would not be possible to laout > the array b without alignment gaps??? Why would the alignment requirement be 8 ? On such a system an implementation would probably pad the struct (which is allowed), so sizeof(T) would be 16. -- __/ __/ - Christian Froeschlin / / / _/ * If you eliminate the impossible, whatever remains, * ___/ _/ * however improbable, must be the BUG ! *